From: Zeev Suraski Date: Fri, 10 Aug 2001 12:48:06 +0000 (+0000) Subject: Centralize macros X-Git-Tag: BEFORE_EXP_MERGE~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7b2b02032b0600fbbebc9f95030cfd51d8e87ca;p=php Centralize macros --- diff --git a/main/php.h b/main/php.h index 6a0292c926..c4e2b4657b 100644 --- a/main/php.h +++ b/main/php.h @@ -207,27 +207,6 @@ char *strerror(int); # endif #endif -#define PHP_FN(name) php_if_##name -#define PHP_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS) -#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(PHP_FN(name)) - -#define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types }, -#define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types) -#define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types) -#define PHP_STATIC_FE(php_name, func_name, arg_types) { php_name, func_name, arg_types }, - -#define PHP_MINIT(module) php_minit_##module -#define PHP_MSHUTDOWN(module) php_mshutdown_##module -#define PHP_RINIT(module) php_rinit_##module -#define PHP_RSHUTDOWN(module) php_rshutdown_##module -#define PHP_MINFO(module) php_info_##module - -#define PHP_MINIT_FUNCTION(module) int PHP_MINIT(module)(INIT_FUNC_ARGS) -#define PHP_MSHUTDOWN_FUNCTION(module) int PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS) -#define PHP_RINIT_FUNCTION(module) int PHP_RINIT(module)(INIT_FUNC_ARGS) -#define PHP_RSHUTDOWN_FUNCTION(module) int PHP_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS) -#define PHP_MINFO_FUNCTION(module) void PHP_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS) - /* global variables */ extern pval *data; #if !defined(PHP_WIN32) diff --git a/main/php3_compat.h b/main/php3_compat.h index 4093a79a90..017864b2ca 100644 --- a/main/php3_compat.h +++ b/main/php3_compat.h @@ -99,4 +99,26 @@ typedef zval pval; #define list_entry zend_rsrc_list_entry +/* Compatibility macros */ +#define PHP_FN(name) ZEND_FN(name) +#define PHP_NAMED_FUNCTION(name) ZEND_NAMED_FUNCTION(name) +#define PHP_FUNCTION(name) ZEND_FUNCTION(name) + +#define PHP_NAMED_FE(php_name, name, arg_types) ZEND_NAMED_FE(php_name, name, arg_types) +#define PHP_FE(name, arg_types) ZEND_FE(name, arg_types) +#define PHP_FALIAS(name, alias, arg_types) ZEND_FALIAS(name, alias, arg_types) +#define PHP_STATIC_FE(php_name, func_name, arg_types) ZEND_STATIC_FE(php_name, func_name, arg_types) + +#define PHP_MINIT(module) ZEND_MINIT(module) +#define PHP_MSHUTDOWN(module) ZEND_MSHUTDOWN(module) +#define PHP_RINIT(module) ZEND_RINIT(module) +#define PHP_RSHUTDOWN(module) ZEND_RSHUTDOWN(module) +#define PHP_MINFO(module) ZEND_MINFO(module) + +#define PHP_MINIT_FUNCTION(module) ZEND_MINIT_FUNCTION(module) +#define PHP_MSHUTDOWN_FUNCTION(module) ZEND_MSHUTDOWN_FUNCTION(module) +#define PHP_RINIT_FUNCTION(module) ZEND_RINIT_FUNCTION(module) +#define PHP_RSHUTDOWN_FUNCTION(module) ZEND_RSHUTDOWN_FUNCTION(module) +#define PHP_MINFO_FUNCTION(module) ZEND_MINFO_FUNCTION(module) + #endif /* PHP3_COMPAT_H */