summaryrefslogtreecommitdiff
path: root/ext/db/db.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>1999-07-26 20:09:08 +0000
committerAndrey Hristov <andrey@php.net>1999-07-26 20:09:08 +0000
commit1b2c932cc2848da25b38a4e73aa74541a9761beb (patch)
tree19c46f9a829a34237c2411cdce3a3c4ca2f4fde1 /ext/db/db.c
parent7af5579e3f40ccda2e5b5bf47ff3b2a71327317f (diff)
downloadphp-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 'ext/db/db.c')
-rw-r--r--ext/db/db.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/ext/db/db.c b/ext/db/db.c
index 4ca6c23f9d..1c375c0f14 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -240,7 +240,7 @@ static char *php3_get_info_db(void)
}
-void php3_info_db(ZEND_MODULE_INFO_FUNC_ARGS)
+PHP_MINFO_FUNCTION(db)
{
php3_printf(php3_get_info_db());
}
@@ -1079,7 +1079,7 @@ datum flatfile_nextkey(FILE *dbf) {
#endif
-int php3_minit_db(INIT_FUNC_ARGS)
+PHP_MINIT_FUNCTION(db)
{
#if defined(THREAD_SAFE)
dbm_global_struct *dbm_globals;
@@ -1104,7 +1104,8 @@ int php3_minit_db(INIT_FUNC_ARGS)
return SUCCESS;
}
-static int php3_mend_db(void){
+static PHP_MSHUTDOWN_FUNCTION(db)
+{
DBM_TLS_VARS;
#ifdef THREAD_SAFE
PHP3_TLS_THREAD_FREE(dbm_globals);
@@ -1121,7 +1122,8 @@ static int php3_mend_db(void){
return SUCCESS;
}
-int php3_rinit_db(INIT_FUNC_ARGS) {
+PHP_RINIT_FUNCTION(db)
+{
#if !GDBM && !NDBM
CurrentFlatFilePos = 0L;
#endif
@@ -1130,21 +1132,21 @@ int php3_rinit_db(INIT_FUNC_ARGS) {
function_entry dbm_functions[] = {
- {"dblist", php3_dblist, NULL},
- {"dbmopen", php3_dbmopen, NULL},
- {"dbmclose", php3_dbmclose, NULL},
- {"dbminsert", php3_dbminsert, NULL},
- {"dbmfetch", php3_dbmfetch, NULL},
- {"dbmreplace", php3_dbmreplace, NULL},
- {"dbmexists", php3_dbmexists, NULL},
- {"dbmdelete", php3_dbmdelete, NULL},
- {"dbmfirstkey", php3_dbmfirstkey, NULL},
- {"dbmnextkey", php3_dbmnextkey, NULL},
+ PHP_FE(dblist, NULL)
+ PHP_FE(dbmopen, NULL)
+ PHP_FE(dbmclose, NULL)
+ PHP_FE(dbminsert, NULL)
+ PHP_FE(dbmfetch, NULL)
+ PHP_FE(dbmreplace, NULL)
+ PHP_FE(dbmexists, NULL)
+ PHP_FE(dbmdelete, NULL)
+ PHP_FE(dbmfirstkey, NULL)
+ PHP_FE(dbmnextkey, NULL)
{NULL,NULL,NULL}
};
php3_module_entry dbm_module_entry = {
- "DBM", dbm_functions, php3_minit_db, php3_mend_db, php3_rinit_db, NULL, php3_info_db, STANDARD_MODULE_PROPERTIES
+ "DBM", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
};
#if COMPILE_DL