geos/geos-3.3.2-php-5.4.patch
Vít Ondruch ff338a31e0 Rebuilt for Ruby 1.9.3.
Rebuilt for PHP 5.4.
2012-02-27 17:07:13 +01:00

90 lines
2.7 KiB
Diff

Index: php/geos.c
===================================================================
--- php/geos.c (revision 3573)
+++ php/geos.c (working copy)
@@ -44,7 +44,11 @@
PHP_FUNCTION(GEOSSharedPaths);
PHP_FUNCTION(GEOSRelateMatch);
+#if PHP_VERSION_ID < 50399
static function_entry geos_functions[] = {
+#else
+static zend_function_entry geos_functions[] = {
+#endif
PHP_FE(GEOSVersion, NULL)
PHP_FE(GEOSPolygonize, NULL)
PHP_FE(GEOSLineMerge, NULL)
@@ -161,8 +165,12 @@
ALLOC_HASHTABLE(obj->std.properties);
zend_hash_init(obj->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+#if PHP_VERSION_ID < 50399
zend_hash_copy(obj->std.properties, &type->default_properties,
(copy_ctor_func_t)zval_add_ref, (void *)&tmp, sizeof(zval *));
+#else
+ object_properties_init(&(obj->std), type);
+#endif
retval.handle = zend_objects_store_put(obj, NULL, st, NULL TSRMLS_CC);
retval.handlers = handlers;
@@ -233,7 +241,11 @@
PHP_METHOD(Geometry, hausdorffDistance);
PHP_METHOD(Geometry, snapTo);
+#if PHP_VERSION_ID < 50399
static function_entry Geometry_methods[] = {
+#else
+static zend_function_entry Geometry_methods[] = {
+#endif
PHP_ME(Geometry, __construct, NULL, 0)
PHP_ME(Geometry, __toString, NULL, 0)
PHP_ME(Geometry, project, NULL, 0)
@@ -1906,7 +1918,11 @@
PHP_METHOD(WKTReader, __construct);
PHP_METHOD(WKTReader, read);
+#if PHP_VERSION_ID < 50399
static function_entry WKTReader_methods[] = {
+#else
+static zend_function_entry WKTReader_methods[] = {
+#endif
PHP_ME(WKTReader, __construct, NULL, 0)
PHP_ME(WKTReader, read, NULL, 0)
{NULL, NULL, NULL}
@@ -1984,7 +2000,11 @@
PHP_METHOD(WKTWriter, getOutputDimension);
PHP_METHOD(WKTWriter, setOld3D);
+#if PHP_VERSION_ID < 50399
static function_entry WKTWriter_methods[] = {
+#else
+static zend_function_entry WKTWriter_methods[] = {
+#endif
PHP_ME(WKTWriter, __construct, NULL, 0)
PHP_ME(WKTWriter, write, NULL, 0)
PHP_ME(WKTWriter, setTrim, NULL, 0)
@@ -2156,7 +2176,11 @@
PHP_METHOD(WKBWriter, getIncludeSRID);
PHP_METHOD(WKBWriter, writeHEX);
+#if PHP_VERSION_ID < 50399
static function_entry WKBWriter_methods[] = {
+#else
+static zend_function_entry WKBWriter_methods[] = {
+#endif
PHP_ME(WKBWriter, __construct, NULL, 0)
PHP_ME(WKBWriter, getOutputDimension, NULL, 0)
PHP_ME(WKBWriter, setOutputDimension, NULL, 0)
@@ -2352,7 +2376,11 @@
PHP_METHOD(WKBReader, __construct);
PHP_METHOD(WKBReader, readHEX);
+#if PHP_VERSION_ID < 50399
static function_entry WKBReader_methods[] = {
+#else
+static zend_function_entry WKBReader_methods[] = {
+#endif
PHP_ME(WKBReader, __construct, NULL, 0)
PHP_ME(WKBReader, readHEX, NULL, 0)
{NULL, NULL, NULL}