[geos-commits] r4019 - trunk/php
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Sep 24 00:52:27 PDT 2014
Author: strk
Date: 2014-09-24 00:52:27 -0700 (Wed, 24 Sep 2014)
New Revision: 4019
Modified:
trunk/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: trunk/php/geos.c
===================================================================
--- trunk/php/geos.c 2014-09-23 08:17:24 UTC (rev 4018)
+++ trunk/php/geos.c 2014-09-24 07:52:27 UTC (rev 4019)
@@ -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();
zend_object_value retval;
Proxy *obj = (Proxy *)emalloc(sizeof(Proxy));
@@ -414,6 +419,7 @@
static void
dumpGeometry(GEOSGeometry* g, zval* array)
{
+ TSRMLS_FETCH();
int ngeoms, i;
/*
More information about the geos-commits
mailing list