[geos-commits] r4020 - in branches/3.4: . php

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Sep 24 00:54:58 PDT 2014


Author: strk
Date: 2014-09-24 00:54:58 -0700 (Wed, 24 Sep 2014)
New Revision: 4020

Modified:
   branches/3.4/NEWS
   branches/3.4/php/geos.c
Log:
Fixed compilation against thread-safe PHP (ZTS)

Closes #541
Patch-by: Benjamin Morel <benjamin.morel at gmail.com>
Signed-off-by: Sandro Santilli <strk at keybit.net>

Modified: branches/3.4/NEWS
===================================================================
--- branches/3.4/NEWS	2014-09-24 07:52:27 UTC (rev 4019)
+++ branches/3.4/NEWS	2014-09-24 07:54:58 UTC (rev 4020)
@@ -2,6 +2,7 @@
 YYYY-MM-DD
 
 - Bug fixes / improvements
+ - Fixed compilation against thread-safe PHP (#541)
  - Fix Empty to Empty equals (#703)
  - Fix build on OpenBSD (#700)
  - Fix build on HP-UX 11.23 (#664)

Modified: branches/3.4/php/geos.c
===================================================================
--- branches/3.4/php/geos.c	2014-09-24 07:52:27 UTC (rev 4019)
+++ branches/3.4/php/geos.c	2014-09-24 07:54:58 UTC (rev 4020)
@@ -78,6 +78,7 @@
 
 static void noticeHandler(const char *fmt, ...)
 {
+    TSRMLS_FETCH();
     char message[256];
     va_list args;
     va_start(args, fmt);
@@ -89,6 +90,7 @@
 
 static void errorHandler(const char *fmt, ...)
 {
+    TSRMLS_FETCH();
     char message[256];
     va_list args;
     va_start(args, fmt);
@@ -96,7 +98,7 @@
     va_end(args);
 
     /* TODO: use a GEOSException ? */
-    zend_throw_exception_ex(zend_exception_get_default(TSRMLS_CC),
+    zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C),
         1 TSRMLS_CC, "%s", message); 
 
 }
@@ -108,12 +110,14 @@
 
 static void 
 setRelay(zval* val, void* obj) {
+    TSRMLS_FETCH();
     Proxy* proxy = (Proxy*)zend_object_store_get_object(val TSRMLS_CC);
     proxy->relay = obj;
 }
 
 static inline void *
 getRelay(zval* val, zend_class_entry* ce) {
+    TSRMLS_FETCH();
     Proxy *proxy =  (Proxy*)zend_object_store_get_object(val TSRMLS_CC);
     if ( proxy->std.ce != ce ) {
         php_error_docref(NULL TSRMLS_CC, E_ERROR,
@@ -153,9 +157,10 @@
 }
 
 static zend_object_value
-Gen_create_obj (zend_class_entry *type TSRMLS_DC,
+Gen_create_obj (zend_class_entry *type,
     zend_objects_free_object_storage_t st, zend_object_handlers* handlers)
 {
+    TSRMLS_FETCH();
     zval *tmp;
     zend_object_value retval;
 
@@ -411,6 +416,7 @@
 static void
 dumpGeometry(GEOSGeometry* g, zval* array)
 {
+    TSRMLS_FETCH();
     int ngeoms, i;
 
     /*



More information about the geos-commits mailing list