dmitry Thu, 08 Jul 2010 07:40:02 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301068
Log:
Reduced overhead of request startup
Changed paths:
U php/php-src/trunk/ext/mbstring/mb_gpc.c
U php/php-src/trunk/ext/mbstring/mbstring.c
U php/php-src/trunk/ext/mbstring/mbstring.h
Modified: php/php-src/trunk/ext/mbstring/mb_gpc.c
===================================================================
--- php/php-src/trunk/ext/mbstring/mb_gpc.c 2010-07-08 07:38:59 UTC (rev
301067)
+++ php/php-src/trunk/ext/mbstring/mb_gpc.c 2010-07-08 07:40:02 UTC (rev
301068)
@@ -60,7 +60,7 @@
php_mb_encoding_handler_info_t info;
if (arg != PARSE_STRING) {
- char *value = zend_ini_string("mbstring.internal_encoding",
sizeof("mbstring.internal_encoding"), 0);
+ char *value = MBSTRG(internal_encoding_name);
_php_mb_ini_mbstring_internal_encoding_set(value, value ?
strlen(value): 0 TSRMLS_CC);
}
Modified: php/php-src/trunk/ext/mbstring/mbstring.c
===================================================================
--- php/php-src/trunk/ext/mbstring/mbstring.c 2010-07-08 07:38:59 UTC (rev
301067)
+++ php/php-src/trunk/ext/mbstring/mbstring.c 2010-07-08 07:40:02 UTC (rev
301068)
@@ -1108,6 +1108,9 @@
/* {{{ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) */
static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
{
+ if (OnUpdateString(entry, new_value, new_value_length, mh_arg1,
mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) {
+ return FAILURE;
+ }
if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN
|| stage == PHP_INI_STAGE_RUNTIME) {
return _php_mb_ini_mbstring_internal_encoding_set(new_value,
new_value_length TSRMLS_CC);
@@ -1245,7 +1248,7 @@
PHP_INI_ENTRY("mbstring.detect_order", NULL, PHP_INI_ALL,
OnUpdate_mbstring_detect_order)
PHP_INI_ENTRY("mbstring.http_input", "pass", PHP_INI_ALL,
OnUpdate_mbstring_http_input)
PHP_INI_ENTRY("mbstring.http_output", "pass", PHP_INI_ALL,
OnUpdate_mbstring_http_output)
- PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL,
OnUpdate_mbstring_internal_encoding)
+ STD_PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL,
OnUpdate_mbstring_internal_encoding, internal_encoding_name,
zend_mbstring_globals, mbstring_globals)
#ifdef ZEND_MULTIBYTE
PHP_INI_ENTRY("mbstring.script_encoding", NULL, PHP_INI_ALL,
OnUpdate_mbstring_script_encoding)
#endif /* ZEND_MULTIBYTE */
Modified: php/php-src/trunk/ext/mbstring/mbstring.h
===================================================================
--- php/php-src/trunk/ext/mbstring/mbstring.h 2010-07-08 07:38:59 UTC (rev
301067)
+++ php/php-src/trunk/ext/mbstring/mbstring.h 2010-07-08 07:40:02 UTC (rev
301068)
@@ -163,6 +163,7 @@
int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint
new_value_length TSRMLS_DC);
ZEND_BEGIN_MODULE_GLOBALS(mbstring)
+ char *internal_encoding_name;
enum mbfl_no_language language;
enum mbfl_no_encoding internal_encoding;
enum mbfl_no_encoding current_internal_encoding;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php