[geos-commits] r3625 - trunk/php
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed May 9 12:28:39 EDT 2012
Author: strk
Date: 2012-05-09 09:28:39 -0700 (Wed, 09 May 2012)
New Revision: 3625
Modified:
trunk/php/geos.c
Log:
Add support for PHP 5.4 (#513) -- thanks voxik
Modified: trunk/php/geos.c
===================================================================
--- trunk/php/geos.c 2012-05-09 16:28:02 UTC (rev 3624)
+++ trunk/php/geos.c 2012-05-09 16:28:39 UTC (rev 3625)
@@ -44,7 +44,11 @@
PHP_FUNCTION(GEOSSharedPaths);
PHP_FUNCTION(GEOSRelateMatch);
-static function_entry geos_functions[] = {
+#if PHP_VERSION_ID < 50399
+#define zend_function_entry function_entry
+#endif
+
+static zend_function_entry geos_functions[] = {
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;
@@ -234,7 +242,7 @@
PHP_METHOD(Geometry, snapTo);
PHP_METHOD(Geometry, node);
-static function_entry Geometry_methods[] = {
+static zend_function_entry Geometry_methods[] = {
PHP_ME(Geometry, __construct, NULL, 0)
PHP_ME(Geometry, __toString, NULL, 0)
PHP_ME(Geometry, project, NULL, 0)
@@ -1923,7 +1931,7 @@
PHP_METHOD(WKTReader, __construct);
PHP_METHOD(WKTReader, read);
-static function_entry WKTReader_methods[] = {
+static zend_function_entry WKTReader_methods[] = {
PHP_ME(WKTReader, __construct, NULL, 0)
PHP_ME(WKTReader, read, NULL, 0)
{NULL, NULL, NULL}
@@ -2001,7 +2009,7 @@
PHP_METHOD(WKTWriter, getOutputDimension);
PHP_METHOD(WKTWriter, setOld3D);
-static function_entry WKTWriter_methods[] = {
+static zend_function_entry WKTWriter_methods[] = {
PHP_ME(WKTWriter, __construct, NULL, 0)
PHP_ME(WKTWriter, write, NULL, 0)
PHP_ME(WKTWriter, setTrim, NULL, 0)
@@ -2173,7 +2181,7 @@
PHP_METHOD(WKBWriter, getIncludeSRID);
PHP_METHOD(WKBWriter, writeHEX);
-static function_entry WKBWriter_methods[] = {
+static zend_function_entry WKBWriter_methods[] = {
PHP_ME(WKBWriter, __construct, NULL, 0)
PHP_ME(WKBWriter, getOutputDimension, NULL, 0)
PHP_ME(WKBWriter, setOutputDimension, NULL, 0)
@@ -2369,7 +2377,7 @@
PHP_METHOD(WKBReader, __construct);
PHP_METHOD(WKBReader, readHEX);
-static function_entry WKBReader_methods[] = {
+static zend_function_entry WKBReader_methods[] = {
PHP_ME(WKBReader, __construct, NULL, 0)
PHP_ME(WKBReader, readHEX, NULL, 0)
{NULL, NULL, NULL}
More information about the geos-commits
mailing list