Skip to content

Commit e835bed

Browse files
committed
feat: add ZEND_MODULE_ENTRY
1 parent f5d45ce commit e835bed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_API.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,11 @@ typedef struct _zend_fcall_info_cache {
238238
#define ZEND_MODULE_GLOBALS_CTOR_D(module) void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals)
239239
#define ZEND_MODULE_GLOBALS_DTOR_D(module) void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals)
240240

241+
#define ZEND_MODULE_ENTRY(name) (&name##_module_entry)
242+
241243
#define ZEND_GET_MODULE(name) \
242244
BEGIN_EXTERN_C()\
243-
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\
245+
ZEND_DLEXPORT zend_module_entry *get_module(void) { return ZEND_MODULE_ENTRY(name); }\
244246
END_EXTERN_C()
245247

246248
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \

0 commit comments

Comments
 (0)