From ffa341de59bafd1625076fbe04a4e44b3ea2d692 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 30 Jul 2015 08:31:00 +0200 Subject: add macro to access globals as whole --- Zend/zend_API.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Zend/zend_API.h') diff --git a/Zend/zend_API.h b/Zend/zend_API.h index ee3c8d96a7..8dc3e8a2e8 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -159,6 +159,7 @@ typedef struct _zend_fcall_info_cache { #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) +#define ZEND_MODULE_GLOBALS_BULK(module_name) TSRMG_BULK(module_name##_globals_id, zend_##module_name##_globals *) #else @@ -169,6 +170,7 @@ typedef struct _zend_fcall_info_cache { #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) +#define ZEND_MODULE_GLOBALS_BULK(module_name) (&module_name##_globals) #endif -- cgit v1.2.1