]> granicus.if.org Git - php/commitdiff
integrate tsrmls cache
authorAnatol Belski <ab@php.net>
Tue, 12 Jan 2016 08:42:38 +0000 (09:42 +0100)
committerAnatol Belski <ab@php.net>
Tue, 12 Jan 2016 08:42:38 +0000 (09:42 +0100)
ext/interbase/config.m4
ext/interbase/config.w32
ext/interbase/interbase.c

index 4f694caeab9d46ca321a75f0726261e4afe84a88..ace3047e65c05c13cd41def44f246ed37337990b 100644 (file)
@@ -37,6 +37,6 @@ if test "$PHP_INTERBASE" != "no"; then
   PHP_ADD_LIBRARY_WITH_PATH($IBASE_LIBNAME, $IBASE_LIBDIR, INTERBASE_SHARED_LIBADD)
   PHP_ADD_INCLUDE($IBASE_INCDIR)
   AC_DEFINE(HAVE_IBASE,1,[ ])
-  PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared)
+  PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
   PHP_SUBST(INTERBASE_SHARED_LIBADD)
 fi
index 89cd67219c4f377548dbbf451d82ae56dc4a073a..9891fae44224289e06c9d74d57ef84552ceaa572 100644 (file)
@@ -9,7 +9,7 @@ if (PHP_INTERBASE != "no") {
                        (CHECK_LIB("fbclient_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE) ||
                         CHECK_LIB("gds32_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE))) {
 
-               EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c");
+               EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c", PHP_INTERBASE_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
                AC_DEFINE('HAVE_IBASE', 1, 'Have interbase library');
        } else {
                WARNING("interbase not enabled; libraries and headers not found");
index 1b3656ce6df5fe9ccdf5e7c027ba9b8c8a84ef26..21a0243b4383303dcecee0e39270392cae77ba30 100644 (file)
@@ -460,6 +460,9 @@ zend_module_entry ibase_module_entry = {
 };
 
 #ifdef COMPILE_DL_INTERBASE
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE();
+#endif
 ZEND_GET_MODULE(ibase)
 #endif
 
@@ -717,6 +720,9 @@ PHP_INI_END()
 
 static PHP_GINIT_FUNCTION(ibase)
 {
+#if defined(COMPILE_DL_INTERBASE) && defined(ZTS)
+       ZEND_TSRMLS_CACHE_UPDATE();
+#endif
        ibase_globals->num_persistent = ibase_globals->num_links = 0;
        ibase_globals->sql_code = *ibase_globals->errmsg = 0;
        ibase_globals->default_link = NULL;