diff options
author | Andrey Hristov <andrey@php.net> | 1999-09-03 21:12:10 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 1999-09-03 21:12:10 +0000 |
commit | 5e4a85f2e3c2223de9aee7d123688a0fc75ab3f5 (patch) | |
tree | e7d5237e8445c87bacc87fe3b9b52caa7a23e701 | |
parent | 3160cab22bb242c3746fe770b385279f5967bc45 (diff) | |
download | php-git-5e4a85f2e3c2223de9aee7d123688a0fc75ab3f5.tar.gz |
Static is good...
-rw-r--r-- | ext/pcre/php_pcre.c | 54 | ||||
-rw-r--r-- | ext/pcre/php_pcre.h | 5 |
2 files changed, 27 insertions, 32 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 43529a5742..5b136428d4 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -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 @@ static void _php_pcre_shutdown_globals(php_pcre_globals *pcre_globals) #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_MINFO_FUNCTION(pcre) /* {{{ PHP_MINIT_FUNCTION(pcre) */ -PHP_MINIT_FUNCTION(pcre) +static PHP_MINIT_FUNCTION(pcre) { ELS_FETCH(); @@ -132,7 +109,7 @@ PHP_MINIT_FUNCTION(pcre) /* {{{ 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_MSHUTDOWN_FUNCTION(pcre) /* {{{ PHP_RINIT_FUNCTION(pcre) */ -PHP_RINIT_FUNCTION(pcre) +static PHP_RINIT_FUNCTION(pcre) { pcre_malloc = php_pcre_malloc; pcre_free = php_pcre_free; @@ -1127,6 +1104,29 @@ PHP_FUNCTION(preg_grep) /* }}} */ +/* {{{ 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 +}; + +/* }}} */ + + #endif /* HAVE_PCRE */ /* diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index e4df8f07e0..9ddd1f1755 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -39,11 +39,6 @@ #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); PHP_FUNCTION(preg_replace); |