summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2015-12-06 10:04:35 +0000
committerBob Weinand <bobwei9@hotmail.com>2015-12-06 14:06:07 +0100
commit03a43d50e1e18cc809034ce9d5de54bfc99f76f7 (patch)
treefd90e1d1a20a44548e5d6d4ecd4f5ead7abd7514 /sapi/phpdbg/phpdbg.c
parent713ad54fec5e54fd6295902c03497664f4aa62b1 (diff)
downloadphp-git-03a43d50e1e18cc809034ce9d5de54bfc99f76f7.tar.gz
standard tsrm usage for seven
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index d3ed746725..af1bfc7aba 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -52,6 +52,10 @@
# include "openssl/applink.c"
#endif
+#if defined(PHP_WIN32) && defined(ZTS)
+ZEND_TSRMLS_CACHE_DEFINE();
+#endif
+
ZEND_DECLARE_MODULE_GLOBALS(phpdbg);
int phpdbg_startup_run = 0;
@@ -1312,10 +1316,6 @@ int main(int argc, char **argv) /* {{{ */
zend_bool is_exit;
int exit_status;
-#ifdef ZTS
- void ***tsrm_ls;
-#endif
-
#ifndef _WIN32
struct sigaction sigio_struct;
struct sigaction signal_struct;
@@ -1338,8 +1338,8 @@ int main(int argc, char **argv) /* {{{ */
#ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
-
- tsrm_ls = ts_resource(0);
+ (void*)ts_resource(0);
+ ZEND_TSRMLS_CACHE_UPDATE();
#endif
#ifdef ZEND_SIGNALS
@@ -1608,7 +1608,7 @@ phpdbg_main:
if (settings > (zend_phpdbg_globals *) 0x2) {
#ifdef ZTS
- *((zend_phpdbg_globals *) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
+ *((zend_phpdbg_globals *) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
#else
phpdbg_globals = *settings;
#endif