Skip to content

Commit 8b6f848

Browse files
author
Andi Gutmans
committed
- Merge from Engine 1
1 parent 5ac3adf commit 8b6f848

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

Zend/zend_API.h

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "zend_variables.h"
3030
#include "zend_execute.h"
3131

32-
#define ZEND_FN(name) zend_if_##name
32+
#define ZEND_FN(name) zif_##name
3333
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
3434
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
3535

@@ -38,17 +38,19 @@
3838
#define ZEND_FALIAS(name, alias, arg_types) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_types)
3939
#define ZEND_STATIC_FE(name, impl_name, arg_types) { name, impl_name, arg_types },
4040

41-
#define ZEND_MINIT(module) zend_minit_##module
42-
#define ZEND_MSHUTDOWN(module) zend_mshutdown_##module
43-
#define ZEND_RINIT(module) zend_rinit_##module
44-
#define ZEND_RSHUTDOWN(module) zend_rshutdown_##module
45-
#define ZEND_MINFO(module) zend_info_##module
41+
/* Name macros */
42+
#define ZEND_MODULE_STARTUP_N(module) zm_startup_##module
43+
#define ZEND_MODULE_SHUTDOWN_N(module) zm_shutdown_##module
44+
#define ZEND_MODULE_ACTIVATE_N(module) zm_activate_##module
45+
#define ZEND_MODULE_DEACTIVATE_N(module) zm_deactivate_##module
46+
#define ZEND_MODULE_INFO_N(module) zm_info_##module
4647

47-
#define ZEND_MINIT_FUNCTION(module) int ZEND_MINIT(module)(INIT_FUNC_ARGS)
48-
#define ZEND_MSHUTDOWN_FUNCTION(module) int ZEND_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
49-
#define ZEND_RINIT_FUNCTION(module) int ZEND_RINIT(module)(INIT_FUNC_ARGS)
50-
#define ZEND_RSHUTDOWN_FUNCTION(module) int ZEND_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
51-
#define ZEND_MINFO_FUNCTION(module) void ZEND_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS)
48+
/* Declaration macros */
49+
#define ZEND_MODULE_STARTUP_D(module) int ZEND_MODULE_STARTUP_N(module)(INIT_FUNC_ARGS)
50+
#define ZEND_MODULE_SHUTDOWN_D(module) int ZEND_MODULE_SHUTDOWN_N(module)(SHUTDOWN_FUNC_ARGS)
51+
#define ZEND_MODULE_ACTIVATE_D(module) int ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS)
52+
#define ZEND_MODULE_DEACTIVATE_D(module) int ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS)
53+
#define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)
5254

5355
#define ZEND_GET_MODULE(name) \
5456
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
@@ -397,8 +399,22 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
397399
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? Z_OBJPROP_P(p) : NULL)))
398400
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
399401

402+
/* For compatibility */
403+
#define ZEND_MINIT ZEND_MODULE_STARTUP_N
404+
#define ZEND_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N
405+
#define ZEND_RINIT ZEND_MODULE_ACTIVATE_N
406+
#define ZEND_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N
407+
#define ZEND_MINFO ZEND_MODULE_INFO_N
408+
409+
#define ZEND_MINIT_FUNCTION ZEND_MODULE_STARTUP_D
410+
#define ZEND_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_N
411+
#define ZEND_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_N
412+
#define ZEND_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_N
413+
#define ZEND_MINFO_FUNCTION ZEND_MODULE_INFO_N
414+
400415
#endif /* ZEND_API_H */
401416

417+
402418
/*
403419
* Local variables:
404420
* tab-width: 4

0 commit comments

Comments
 (0)