]> granicus.if.org Git - php/commitdiff
Centralize macros
authorZeev Suraski <zeev@php.net>
Fri, 10 Aug 2001 12:48:06 +0000 (12:48 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 10 Aug 2001 12:48:06 +0000 (12:48 +0000)
main/php.h
main/php3_compat.h

index 6a0292c92662e0736667825cf11fe7e54a459745..c4e2b4657b4cfc1415a573d2877bacd793d92a38 100644 (file)
@@ -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)
index 4093a79a906346e386acf3311a3068c2da61a970..017864b2ca3b2ee406a7d0a9b517950de1893c5d 100644 (file)
@@ -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 */