cvs: /php4/ext/pcre php_pcre.c php_pcre.h

From: Date: Fri, 03 Sep 1999 21:12:11 +0000
Subject: cvs: /php4/ext/pcre php_pcre.c php_pcre.h
Groups: php.version4 
Request: Send a blank email to php-version4+get-4064@lists.php.net to get a copy of this message
andrey Fri Sep 3 17:12:11 1999 EDT Modified files: /php4/ext/pcre php_pcre.c php_pcre.h Log: Static is good... Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.16 php4/ext/pcre/php_pcre.c:1.17 --- php4/ext/pcre/php_pcre.c:1.16 Fri Sep 3 15:01:19 1999 +++ php4/ext/pcre/php_pcre.c Fri Sep 3 17:12:10 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.16 1999/09/03 19:01:19 andrey Exp $ */ +/* $Id: php_pcre.c,v 1.17 1999/09/03 21:12:10 andrey Exp $ */ #include "php.h" #include "php_globals.h" @@ -31,29 +31,6 @@ #define PREG_REPLACE_EVAL (1<<0) -/* {{{ module definition structures */ - -unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; - -function_entry pcre_functions[] = { - PHP_FE(preg_match, third_arg_force_ref) - PHP_FE(preg_match_all, third_arg_force_ref) - PHP_FE(preg_replace, NULL) - PHP_FE(preg_split, NULL) - PHP_FE(preg_quote, NULL) - PHP_FE(preg_grep, NULL) - {NULL, NULL, NULL} -}; - -zend_module_entry pcre_module_entry = { - "PCRE", pcre_functions, PHP_MINIT(pcre), PHP_MSHUTDOWN(pcre), - PHP_RINIT(pcre), NULL, - PHP_MINFO(pcre), STANDARD_MODULE_PROPERTIES -}; - -/* }}} */ - - #ifdef ZTS int pcre_globals_id; #else @@ -98,7 +75,7 @@ #endif -/* {{{ PHP_MINFO_FUNCTION(pcre) */ +static /* {{{ PHP_MINFO_FUNCTION(pcre) */ PHP_MINFO_FUNCTION(pcre) { php_printf("Perl Compatible Regular Expressions"); @@ -111,7 +88,7 @@ /* {{{ PHP_MINIT_FUNCTION(pcre) */ -PHP_MINIT_FUNCTION(pcre) +static PHP_MINIT_FUNCTION(pcre) { ELS_FETCH(); @@ -132,7 +109,7 @@ /* {{{ PHP_MSHUTDOWN_FUNCTION(pcre) */ -PHP_MSHUTDOWN_FUNCTION(pcre) +static PHP_MSHUTDOWN_FUNCTION(pcre) { #ifndef ZTS zend_hash_destroy(&PCRE_G(pcre_cache)); @@ -145,7 +122,7 @@ /* {{{ PHP_RINIT_FUNCTION(pcre) */ -PHP_RINIT_FUNCTION(pcre) +static PHP_RINIT_FUNCTION(pcre) { pcre_malloc = php_pcre_malloc; pcre_free = php_pcre_free; @@ -1124,6 +1101,29 @@ efree(entry); efree(offsets); } +/* }}} */ + + +/* {{{ module definition structures */ + +unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; + +function_entry pcre_functions[] = { + PHP_FE(preg_match, third_arg_force_ref) + PHP_FE(preg_match_all, third_arg_force_ref) + PHP_FE(preg_replace, NULL) + PHP_FE(preg_split, NULL) + PHP_FE(preg_quote, NULL) + PHP_FE(preg_grep, NULL) + {NULL, NULL, NULL} +}; + +zend_module_entry pcre_module_entry = { + "PCRE", pcre_functions, PHP_MINIT(pcre), PHP_MSHUTDOWN(pcre), + PHP_RINIT(pcre), NULL, + PHP_MINFO(pcre), STANDARD_MODULE_PROPERTIES +}; + /* }}} */ Index: php4/ext/pcre/php_pcre.h diff -u php4/ext/pcre/php_pcre.h:1.12 php4/ext/pcre/php_pcre.h:1.13 --- php4/ext/pcre/php_pcre.h:1.12 Fri Sep 3 15:01:19 1999 +++ php4/ext/pcre/php_pcre.h Fri Sep 3 17:12:10 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.h,v 1.12 1999/09/03 19:01:19 andrey Exp $ */ +/* $Id: php_pcre.h,v 1.13 1999/09/03 21:12:10 andrey Exp $ */ #ifndef _PHP_PCRE_H #define _PHP_PCRE_H @@ -38,11 +38,6 @@ #if HAVE_LOCALE_H #include <locale.h> #endif - -PHP_MINFO_FUNCTION(pcre); -PHP_MINIT_FUNCTION(pcre); -PHP_MSHUTDOWN_FUNCTION(pcre); -PHP_RINIT_FUNCTION(pcre); PHP_FUNCTION(preg_match); PHP_FUNCTION(preg_match_all);

« previous php.version4 (#4064) next »