summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index df006e3396..ee3c8d96a7 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -158,6 +158,7 @@ typedef struct _zend_fcall_info_cache {
extern ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
ts_allocate_id(&module_name##_globals_id, sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
+#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) ZEND_TSRMG(module_name##_globals_id, zend_##module_name##_globals *, v)
#else
@@ -167,6 +168,7 @@ typedef struct _zend_fcall_info_cache {
extern zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
+#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) (module_name##_globals.v)
#endif