summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-12-17 21:13:15 +0000
committerZeev Suraski <zeev@php.net>1999-12-17 21:13:15 +0000
commit66f5e500504db274a87d1e8fb41f745e1e484cca (patch)
tree8faaaac47d26b4126a91cd45e4ad396247680807
parent2d0b84ee3021e171007fe2f35043c012580483cf (diff)
downloadphp-git-66f5e500504db274a87d1e8fb41f745e1e484cca.tar.gz
More cleanup...
-rw-r--r--ext/aspell/aspell.c12
-rw-r--r--ext/aspell/php_aspell.h1
-rw-r--r--ext/dav/dav.c54
-rw-r--r--ext/mssql/php_mssql.c2
4 files changed, 25 insertions, 44 deletions
diff --git a/ext/aspell/aspell.c b/ext/aspell/aspell.c
index c96213b381..6e89125578 100644
--- a/ext/aspell/aspell.c
+++ b/ext/aspell/aspell.c
@@ -55,16 +55,18 @@ zend_module_entry aspell_module_entry = {
DLEXPORT zend_module_entry *get_module(void) { return &aspell_module_entry; }
#endif
+static void php_aspell_close(aspell *sc)
+{
+ aspell_free(sc);
+}
+
+
PHP_MINIT_FUNCTION(aspell)
{
- le_aspell = register_list_destructors(php3_aspell_close,NULL);
+ le_aspell = register_list_destructors(php_aspell_close,NULL);
return SUCCESS;
}
-void php3_aspell_close(aspell *sc)
-{
- aspell_free(sc);
-}
/* {{{ proto int aspell_new(string master[, string personal])
Load a dictionary */
diff --git a/ext/aspell/php_aspell.h b/ext/aspell/php_aspell.h
index 787412dddb..cdc0ce4177 100644
--- a/ext/aspell/php_aspell.h
+++ b/ext/aspell/php_aspell.h
@@ -38,7 +38,6 @@ extern zend_module_entry aspell_module_entry;
extern PHP_MINIT_FUNCTION(aspell);
extern PHP_MINFO_FUNCTION(aspell);
-extern void php3_aspell_close();
PHP_FUNCTION(aspell_new);
PHP_FUNCTION(aspell_check);
diff --git a/ext/dav/dav.c b/ext/dav/dav.c
index ca57c6ecb2..ea936300a4 100644
--- a/ext/dav/dav.c
+++ b/ext/dav/dav.c
@@ -50,20 +50,20 @@ DWORD PHPDAVTls;
static int numthreads=0;
typedef struct phpdav_global_struct {
- phpdav_module php3_dav_module;
+ phpdav_module php_dav_module;
} phpdav_global_struct;
# else /* !defined(THREAD_SAFE) */
# define DAV_GLOBAL(a) a
# define DAV_TLS_VARS
-phpdav_module php3_dav_module;
+phpdav_module php_dav_module;
# endif /* defined(THREAD_SAFE) */
-# define DAV_HANDLER(a) DAV_GLOBAL(php3_dav_module).a##_handler
+# define DAV_HANDLER(a) DAV_GLOBAL(php_dav_module).a##_handler
# define DAV_SET_HANDLER(a,b) \
- dav_set_handler(&DAV_GLOBAL(php3_dav_module).a##_handler,(b))
+ dav_set_handler(&DAV_GLOBAL(php_dav_module).a##_handler,(b))
/* }}} */
@@ -76,11 +76,10 @@ DLEXPORT zend_module_entry *get_module() { return &phpdav_module_entry; };
/* }}} */
/* {{{ function prototypes */
-int php3_minit_phpdav(INIT_FUNC_ARGS);
-int php3_rinit_phpdav(INIT_FUNC_ARGS);
-int php3_mshutdown_phpdav(SHUTDOWN_FUNC_ARGS);
-int php3_rshutdown_phpdav(SHUTDOWN_FUNC_ARGS);
-void php3_info_phpdav(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_MINIT_FUNCTION(phpdav);
+PHP_MSHUTDOWN_FUNCTION(phpdav);
+PHP_RSHUTDOWN_FUNCTION(phpdav);
+PHP_MINFO_FUNCTION(phpdav);
/* }}} */
/* {{{ extension definition structures */
@@ -93,20 +92,18 @@ function_entry phpdav_functions[] = {
zend_module_entry phpdav_module_entry = {
"DAV", /* extension name */
phpdav_functions, /* extension function list */
- php3_minit_phpdav, /* extension-wide startup function */
- php3_mshutdown_phpdav, /* extension-wide shutdown function */
- php3_rinit_phpdav, /* per-request startup function */
- php3_rshutdown_phpdav, /* per-request shutdown function */
- php3_info_phpdav, /* information function */
+ PHP_MINIT(phpdav), /* extension-wide startup function */
+ PHP_MSHUTDOWN(phpdav), /* extension-wide shutdown function */
+ NULL, /* per-request startup function */
+ PHP_RSHUTDOWN(phpdav), /* per-request shutdown function */
+ PHP_MINFO(phpdav), /* information function */
STANDARD_MODULE_PROPERTIES
};
/* }}} */
/* {{{ startup, shutdown and info functions */
- /* {{{ php3_minit_phpdav */
-
-int php3_minit_phpdav(INIT_FUNC_ARGS)
+PHP_MINIT_FUNCTION(phpdav)
{
#if defined(THREAD_SAFE)
phpdav_global_struct *phpdav_globals;
@@ -129,18 +126,8 @@ int php3_minit_phpdav(INIT_FUNC_ARGS)
return SUCCESS;
}
-/* }}} */
- /* {{{ php3_rinit_phpdav */
-int php3_rinit_phpdav(INIT_FUNC_ARGS)
-{
- return SUCCESS;
-}
-
-/* }}} */
- /* {{{ php3_mshutdown_phpdav() */
-
-int php3_mshutdown_phpdav(SHUTDOWN_FUNC_ARGS)
+PHP_MSHUTDOWN_FUNCTION(phpdav)
{
DAV_TLS_VARS;
#ifdef THREAD_SAFE
@@ -158,10 +145,8 @@ int php3_mshutdown_phpdav(SHUTDOWN_FUNC_ARGS)
return SUCCESS;
}
-/* }}} */
- /* {{{ php3_rshutdown_phpdav() */
-int php3_rshutdown_phpdav(SHUTDOWN_FUNC_ARGS)
+PHP_RSHUTDOWN_FUNCTION(phpdav)
{
if (DAV_HANDLER(mkcol_test)) {
efree(DAV_HANDLER(mkcol_test));
@@ -172,16 +157,11 @@ int php3_rshutdown_phpdav(SHUTDOWN_FUNC_ARGS)
return SUCCESS;
}
-/* }}} */
- /* {{{ php3_info_phpdav() */
-void php3_info_phpdav(ZEND_MODULE_INFO_FUNC_ARGS)
+PHP_MINFO_FUNCTION(phpdav);
{
}
-/* }}} */
-
-/* }}} */
/* {{{ extension-internal functions */
/* {{{ dav_set_handler() */
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index 4da3a3677a..a961ac4cba 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -982,7 +982,7 @@ static void php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
tmp = result->data[result->cur_row][i];
pval_copy_constructor(&tmp);
if (PG(magic_quotes_runtime) && tmp.type == IS_STRING) {
- tmp.value.str.val = _php3_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1);
+ tmp.value.str.val = php_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1);
}
zend_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(pval), (void **) &pvalue_ptr);
zend_hash_pointer_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, pvalue_ptr);