integrate tsrmls cache

This commit is contained in:
Anatol Belski 2016-01-12 09:42:38 +01:00
parent 391b73b484
commit b54739e68d
3 changed files with 8 additions and 2 deletions

View 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

View 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");

View 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;