]> granicus.if.org Git - php/commitdiff
Static is good...
authorAndrey Hristov <andrey@php.net>
Fri, 3 Sep 1999 21:12:10 +0000 (21:12 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 3 Sep 1999 21:12:10 +0000 (21:12 +0000)
ext/pcre/php_pcre.c
ext/pcre/php_pcre.h

index 43529a57423923430e8390782dcc43dcf4895a8c..5b136428d484d845d3d614056f9ae3c7c692bfdd 100644 (file)
 
 #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 */
 
 /*
index e4df8f07e070e3089b727fca22de5e0c21706da0..9ddd1f17551dfea74a5875e01cf2faf0f9ff1a9a 100644 (file)
 #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);