summaryrefslogtreecommitdiff
path: root/ext/com_dotnet
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-10-17 15:51:21 +0200
committerAnatol Belski <ab@php.net>2014-10-17 15:51:21 +0200
commit4fce2ae2c64b61e5ef7cdbdb631b8d5691d1b31f (patch)
treec1e4941189f82e6575fb57de7b0d047404fd0a38 /ext/com_dotnet
parent5749b4a9979cd3ff85996323bed9adc1bd182f76 (diff)
downloadphp-git-4fce2ae2c64b61e5ef7cdbdb631b8d5691d1b31f.tar.gz
opcache, intl, gmp, exif, com, bcmath to use static tsrmls
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r--ext/com_dotnet/com_extension.c6
-rw-r--r--ext/com_dotnet/config.w323
-rw-r--r--ext/com_dotnet/php_com_dotnet.h5
3 files changed, 12 insertions, 2 deletions
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index f66119842e..ce1fa744dd 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -254,6 +254,9 @@ zend_module_entry com_dotnet_module_entry = {
/* }}} */
#ifdef COMPILE_DL_COM_DOTNET
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
ZEND_GET_MODULE(com_dotnet)
#endif
@@ -337,6 +340,9 @@ PHP_INI_END()
*/
static PHP_GINIT_FUNCTION(com_dotnet)
{
+#if defined(COMPILE_DL_COM_DOTNET) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE;
+#endif
memset(com_dotnet_globals, 0, sizeof(*com_dotnet_globals));
com_dotnet_globals->code_page = CP_ACP;
}
diff --git a/ext/com_dotnet/config.w32 b/ext/com_dotnet/config.w32
index 1526392c24..3ae2328427 100644
--- a/ext/com_dotnet/config.w32
+++ b/ext/com_dotnet/config.w32
@@ -7,7 +7,8 @@ if (PHP_COM_DOTNET == "yes") {
CHECK_LIB('oleaut32.lib', 'com_dotnet');
EXTENSION("com_dotnet", "com_com.c com_dotnet.c com_extension.c \
com_handlers.c com_iterator.c com_misc.c com_olechar.c \
- com_typeinfo.c com_variant.c com_wrapper.c com_saproxy.c com_persist.c");
+ com_typeinfo.c com_variant.c com_wrapper.c com_saproxy.c com_persist.c",
+ null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_COM_DOTNET', 1, 'Have COM_DOTNET support');
CHECK_HEADER_ADD_INCLUDE('mscoree.h', 'CFLAGS_COM_DOTNET');
}
diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h
index cb60083289..5066a044ff 100644
--- a/ext/com_dotnet/php_com_dotnet.h
+++ b/ext/com_dotnet/php_com_dotnet.h
@@ -53,7 +53,10 @@ ZEND_BEGIN_MODULE_GLOBALS(com_dotnet)
ZEND_END_MODULE_GLOBALS(com_dotnet)
#ifdef ZTS
-# define COMG(v) TSRMG(com_dotnet_globals_id, zend_com_dotnet_globals *, v)
+# define COMG(v) ZEND_TSRMG(com_dotnet_globals_id, zend_com_dotnet_globals *, v)
+# ifdef COMPILE_DL_COM_DOTNET
+ZEND_TSRMLS_CACHE_EXTERN;
+# endif
#else
# define COMG(v) (com_dotnet_globals.v)
#endif