diff options
author | Andrey Hristov <andrey@php.net> | 1999-07-26 20:09:08 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 1999-07-26 20:09:08 +0000 |
commit | 1b2c932cc2848da25b38a4e73aa74541a9761beb (patch) | |
tree | 19c46f9a829a34237c2411cdce3a3c4ca2f4fde1 /main/php.h | |
parent | 7af5579e3f40ccda2e5b5bf47ff3b2a71327317f (diff) | |
download | php-git-1b2c932cc2848da25b38a4e73aa74541a9761beb.tar.gz |
More symbol work.
I've defined a few macros to help with module/request init/startup function definitions.
Basically:
PHP_MINIT_FUNCTION(module)
PHP_MSHUTDOWN_FUNCTION(module)
PHP_RINIT_FUNCTION(module)
PHP_RSHUTDOWN_FUNCTION(module)
PHP_MINFO_FUNCTION(module)
These will expand to proper function prototypes.
Now to specify these in the module entry, use:
PHP_MINIT(module)
PHP_MSHUTDOWN(module)
PHP_RINIT(module)
PHP_RSHUTDOWN(module)
PHP_MINFO(module)
I've updated all modules in ext/standard and everything from ext/apache to ext/db.
If you can, please update your module to use these macros.
Diffstat (limited to 'main/php.h')
-rw-r--r-- | main/php.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/php.h b/main/php.h index 06256874a8..ae74736efa 100644 --- a/main/php.h +++ b/main/php.h @@ -246,6 +246,7 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list); #define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */ #endif +#define PHP_FN(name) php3_##name #define PHP_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS) #define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name) @@ -253,6 +254,18 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list); #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, php3_##name, arg_types) #define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, php3_##alias, arg_types) +#define PHP_MINIT(module) php3_minit_##module +#define PHP_MSHUTDOWN(module) php3_mshutdown_##module +#define PHP_RINIT(module) php3_rinit_##module +#define PHP_RSHUTDOWN(module) php3_rshutdown_##module +#define PHP_MINFO(module) php3_info_##module + +#define PHP_MINIT_FUNCTION(module) int php3_minit_##module(INIT_FUNC_ARGS) +#define PHP_MSHUTDOWN_FUNCTION(module) int php3_mshutdown_##module(SHUTDOWN_FUNC_ARGS) +#define PHP_RINIT_FUNCTION(module) int php3_rinit_##module(INIT_FUNC_ARGS) +#define PHP_RSHUTDOWN_FUNCTION(module) int php3_rshutdown_##module(SHUTDOWN_FUNC_ARGS) +#define PHP_MINFO_FUNCTION(module) void php3_info_##module(ZEND_MODULE_INFO_FUNC_ARGS) + /* global variables */ extern pval *data; |