cvs: /php4/ext/aspell aspell.c php_aspell.h /php4/ext/dav dav.c /php4/ext/mssql php_mssql.c
| From: | Zeev Suraski | Date: | Fri, 17 Dec 1999 21:13:47 +0000 |
| Subject: | cvs: /php4/ext/aspell aspell.c php_aspell.h /php4/ext/dav dav.c /php4/ext/mssql php_mssql.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8094@lists.php.net to get a copy of this message | ||
zeev Fri Dec 17 16:13:47 1999 EDT
Modified files:
/php4/ext/aspell aspell.c php_aspell.h
/php4/ext/dav dav.c
/php4/ext/mssql php_mssql.c
Log:
More cleanup...
Index: php4/ext/aspell/aspell.c
diff -u php4/ext/aspell/aspell.c:1.9 php4/ext/aspell/aspell.c:1.10
--- php4/ext/aspell/aspell.c:1.9 Fri Dec 17 15:54:44 1999
+++ php4/ext/aspell/aspell.c Fri Dec 17 16:13:13 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aspell.c,v 1.9 1999/12/17 20:54:44 zeev Exp $ */
+/* $Id: aspell.c,v 1.10 1999/12/17 21:13:13 zeev Exp $ */
#include "php.h"
#if defined(COMPILE_DL)
@@ -55,15 +55,17 @@
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])
Index: php4/ext/aspell/php_aspell.h
diff -u php4/ext/aspell/php_aspell.h:1.2 php4/ext/aspell/php_aspell.h:1.3
--- php4/ext/aspell/php_aspell.h:1.2 Fri Dec 17 15:54:45 1999
+++ php4/ext/aspell/php_aspell.h Fri Dec 17 16:13:13 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php_aspell.h,v 1.2 1999/12/17 20:54:45 zeev Exp $ */
+/* $Id: php_aspell.h,v 1.3 1999/12/17 21:13:13 zeev Exp $ */
#ifndef _ASPELL_H
#define _ASPELL_H
@@ -38,7 +38,6 @@
extern PHP_MINIT_FUNCTION(aspell);
extern PHP_MINFO_FUNCTION(aspell);
-extern void php3_aspell_close();
PHP_FUNCTION(aspell_new);
PHP_FUNCTION(aspell_check);
Index: php4/ext/dav/dav.c
diff -u php4/ext/dav/dav.c:1.5 php4/ext/dav/dav.c:1.6
--- php4/ext/dav/dav.c:1.5 Fri Dec 17 15:54:48 1999
+++ php4/ext/dav/dav.c Fri Dec 17 16:13:14 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dav.c,v 1.5 1999/12/17 20:54:48 zeev Exp $ */
+/* $Id: dav.c,v 1.6 1999/12/17 21:13:14 zeev Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
@@ -50,20 +50,20 @@
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 @@
/* }}} */
/* {{{ 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 @@
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,19 +126,9 @@
return SUCCESS;
}
-/* }}} */
- /* {{{ php3_rinit_phpdav */
-int php3_rinit_phpdav(INIT_FUNC_ARGS)
+PHP_MSHUTDOWN_FUNCTION(phpdav)
{
- return SUCCESS;
-}
-
-/* }}} */
- /* {{{ php3_mshutdown_phpdav() */
-
-int php3_mshutdown_phpdav(SHUTDOWN_FUNC_ARGS)
-{
DAV_TLS_VARS;
#ifdef THREAD_SAFE
PHP3_TLS_THREAD_FREE(phpdav_globals);
@@ -158,10 +145,8 @@
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 @@
return SUCCESS;
}
-/* }}} */
- /* {{{ php3_info_phpdav() */
-void php3_info_phpdav(ZEND_MODULE_INFO_FUNC_ARGS)
+PHP_MINFO_FUNCTION(phpdav);
{
}
-/* }}} */
-
-/* }}} */
/* {{{ extension-internal functions */
/* {{{ dav_set_handler() */
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.3 php4/ext/mssql/php_mssql.c:1.4
--- php4/ext/mssql/php_mssql.c:1.3 Sat Dec 4 14:15:55 1999
+++ php4/ext/mssql/php_mssql.c Fri Dec 17 16:13:15 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.3 1999/12/04 19:15:55 sas Exp $ */
+/* $Id: php_mssql.c,v 1.4 1999/12/17 21:13:15 zeev Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
@@ -982,7 +982,7 @@
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);