From: Anatol Belski Date: Tue, 12 Jan 2016 08:42:38 +0000 (+0100) Subject: integrate tsrmls cache X-Git-Tag: php-7.0.3RC1~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b54739e68d7677f9e295e8316ef3958500f11cac;p=php integrate tsrmls cache --- diff --git a/ext/interbase/config.m4 b/ext/interbase/config.m4 index 4f694caeab..ace3047e65 100644 --- a/ext/interbase/config.m4 +++ b/ext/interbase/config.m4 @@ -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 diff --git a/ext/interbase/config.w32 b/ext/interbase/config.w32 index 89cd67219c..9891fae442 100644 --- a/ext/interbase/config.w32 +++ b/ext/interbase/config.w32 @@ -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"); diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 1b3656ce6d..21a0243b43 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -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;