summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mbstring/mbstring.c23
-rw-r--r--ext/mbstring/php_mbregex.c8
-rw-r--r--ext/mbstring/php_mbregex.h4
3 files changed, 19 insertions, 16 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 0c023a0d7b..fab11ac8b3 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -80,6 +80,11 @@
#endif
/* }}} */
+/* {{{ prototypes */
+static void _php_mb_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC);
+static void _php_mb_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC);
+/* }}} */
+
/* {{{ php_mb_default_identify_list[] */
#if defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
@@ -680,8 +685,7 @@ PHP_INI_END()
/* }}} */
/* {{{ module global initialize handler */
-static void
-php_mb_init_globals(zend_mbstring_globals *pglobals TSRMLS_DC)
+static void _php_mb_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC)
{
MBSTRG(language) = mbfl_no_language_uni;
MBSTRG(current_language) = MBSTRG(language);
@@ -712,17 +716,16 @@ php_mb_init_globals(zend_mbstring_globals *pglobals TSRMLS_DC)
MBSTRG(encoding_translation) = 0;
pglobals->outconv = NULL;
#if HAVE_MBREGEX
- php_mb_regex_globals_ctor(pglobals TSRMLS_CC);
+ _php_mb_regex_globals_ctor(pglobals TSRMLS_CC);
#endif
}
/* }}} */
/* {{{ static void mbstring_globals_dtor() */
-static void
-mbstring_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC)
+static void _php_mb_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC)
{
#if HAVE_MBREGEX
- php_mb_regex_globals_dtor(pglobals TSRMLS_CC);
+ _php_mb_regex_globals_dtor(pglobals TSRMLS_CC);
#endif
}
/* }}} */
@@ -732,10 +735,10 @@ PHP_MINIT_FUNCTION(mbstring)
{
#ifdef ZTS
ts_allocate_id(&mbstring_globals_id, sizeof(zend_mbstring_globals),
- (ts_allocate_ctor) php_mb_init_globals,
- (ts_allocate_dtor) mbstring_globals_dtor);
+ (ts_allocate_ctor) _php_mb_globals_ctor,
+ (ts_allocate_dtor) _php_mb_globals_dtor);
#else
- php_mb_init_globals(&mbstring_globals TSRMLS_CC);
+ _php_mb_globals_ctor(&mbstring_globals TSRMLS_CC);
#endif
REGISTER_INI_ENTRIES();
@@ -787,7 +790,7 @@ PHP_MSHUTDOWN_FUNCTION(mbstring)
#ifdef ZTS
ts_free_id(mbstring_globals_id);
#else
- mbstring_globals_dtor(&mbstring_globals TSRMLS_CC);
+ _php_mb_globals_dtor(&mbstring_globals TSRMLS_CC);
#endif
return SUCCESS;
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 1f760fd8fb..39fc048a46 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -91,8 +91,8 @@ static void php_mb_regex_free_cache(mb_regex_t *pre)
}
/* }}} */
-/* {{{ php_mb_regex_globals_ctor */
-void php_mb_regex_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC)
+/* {{{ _php_mb_regex_globals_ctor */
+void _php_mb_regex_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC)
{
MBSTRG(default_mbctype) = MBCTYPE_EUC;
MBSTRG(current_mbctype) = MBCTYPE_EUC;
@@ -105,8 +105,8 @@ void php_mb_regex_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC)
}
/* }}} */
-/* {{{ php_mb_regex_globals_dtor */
-void php_mb_regex_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC)
+/* {{{ _php_mb_regex_globals_dtor */
+void _php_mb_regex_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC)
{
zend_hash_destroy(&MBSTRG(ht_rc));
}
diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h
index da7030ed63..ec56265278 100644
--- a/ext/mbstring/php_mbregex.h
+++ b/ext/mbstring/php_mbregex.h
@@ -85,8 +85,8 @@ PHP_MINIT_FUNCTION(mb_regex);
PHP_MSHUTDOWN_FUNCTION(mb_regex);
PHP_RINIT_FUNCTION(mb_regex);
PHP_RSHUTDOWN_FUNCTION(mb_regex);
-void php_mb_regex_globals_ctor(zend_mbstring_globals_ptr pglobals TSRMLS_DC);
-void php_mb_regex_globals_dtor(zend_mbstring_globals_ptr pglobals TSRMLS_DC);
+void _php_mb_regex_globals_ctor(zend_mbstring_globals_ptr pglobals TSRMLS_DC);
+void _php_mb_regex_globals_dtor(zend_mbstring_globals_ptr pglobals TSRMLS_DC);
PHP_FUNCTION(mb_regex_encoding);
PHP_FUNCTION(mb_ereg);