diff options
author | Anatol Belski <ab@php.net> | 2016-01-12 09:42:38 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-01-12 09:42:38 +0100 |
commit | b54739e68d7677f9e295e8316ef3958500f11cac (patch) | |
tree | 324dd0d789db122bf8af75562793d3fb4d90ba7a | |
parent | 391b73b48431aa016e396dc9ad9742e9b1f71cbf (diff) | |
download | php-git-b54739e68d7677f9e295e8316ef3958500f11cac.tar.gz |
integrate tsrmls cache
-rw-r--r-- | ext/interbase/config.m4 | 2 | ||||
-rw-r--r-- | ext/interbase/config.w32 | 2 | ||||
-rw-r--r-- | ext/interbase/interbase.c | 6 |
3 files changed, 8 insertions, 2 deletions
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; |