summaryrefslogtreecommitdiff
path: root/ext/json/php_json.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-07-29 12:26:23 +0200
committerAnatol Belski <ab@php.net>2015-07-29 13:26:35 +0200
commit4e66cce87ce0e57a7394486412e61abcfc5f3520 (patch)
tree74da7597406fcb73d654f193d139c063b3c7093e /ext/json/php_json.h
parent0615aa82d74f91efa4a5a7bcee1b9718fa03f15c (diff)
downloadphp-git-4e66cce87ce0e57a7394486412e61abcfc5f3520.tar.gz
switch to the unified globals accessor where appropriate
Diffstat (limited to 'ext/json/php_json.h')
-rw-r--r--ext/json/php_json.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index c47bc0f401..fccab62fb8 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -82,14 +82,10 @@ ZEND_BEGIN_MODULE_GLOBALS(json)
ZEND_END_MODULE_GLOBALS(json)
ZEND_EXTERN_MODULE_GLOBALS(json);
+#define JSON_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(json, v)
-#ifdef ZTS
-# define JSON_G(v) ZEND_TSRMG(json_globals_id, zend_json_globals *, v)
-# ifdef COMPILE_DL_JSON
-ZEND_TSRMLS_CACHE_EXTERN;
-# endif
-#else
-# define JSON_G(v) (json_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_JSON)
+ZEND_TSRMLS_CACHE_EXTERN();
#endif
/* json_decode() options */