[geos-commits] r3624 - in branches/3.3: . php
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed May 9 12:28:02 EDT 2012
Author: strk
Date: 2012-05-09 09:28:02 -0700 (Wed, 09 May 2012)
New Revision: 3624
Modified:
branches/3.3/NEWS
branches/3.3/php/geos.c
Log:
Add support for PHP 5.4 (#513) -- thanks voxik
Modified: branches/3.3/NEWS
===================================================================
--- branches/3.3/NEWS 2012-05-08 18:41:40 UTC (rev 3623)
+++ branches/3.3/NEWS 2012-05-09 16:28:02 UTC (rev 3624)
@@ -7,6 +7,7 @@
- Better cross-compiler support (#534)
- Enable overlay ops short-circuits (#542)
- Envelope-based short-circuit for symDifference (#543)
+ - Fix support for PHP 5.4 (#513)
Changes in 3.3.3
2012-04-01
Modified: branches/3.3/php/geos.c
===================================================================
--- branches/3.3/php/geos.c 2012-05-08 18:41:40 UTC (rev 3623)
+++ branches/3.3/php/geos.c 2012-05-09 16:28:02 UTC (rev 3624)
@@ -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;
@@ -233,7 +241,7 @@
PHP_METHOD(Geometry, hausdorffDistance);
PHP_METHOD(Geometry, snapTo);
-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)
@@ -1906,7 +1914,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}
@@ -1984,7 +1992,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)
@@ -2156,7 +2164,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)
@@ -2352,7 +2360,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