com php-src: Use one_char_string: Zend/zend_operators .c

From: Date: Thu, 02 Jul 2015 04:19:55 +0000
Subject: com php-src: Use one_char_string: Zend/zend_operators .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87684@lists.php.net to get a copy of this message
Commit: ba711aec30b17015eec8d4438196b21c582f2d1e Author: Xinchen Hui <laruence@php.net> Thu, 2 Jul 2015 12:19:55 +0800 Parents: 0e68e278546b186484310261d95716ac45a13b6e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ba711aec30b17015eec8d4438196b21c582f2d1e Log: Use one_char_string Changed paths: M Zend/zend_operators.c Diff: diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 7ab9e5b..4528e81 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2118,8 +2118,12 @@ static void ZEND_FASTCALL increment_string(zval *str) /* {{{ */ if (Z_STRLEN_P(str) == 0) { zend_string_release(Z_STR_P(str)); - Z_STR_P(str) = zend_string_init("1", sizeof("1")-1, 0); - Z_TYPE_INFO_P(str) = IS_STRING_EX; + if (CG(one_char_string)['1']) { + ZVAL_INTERNED_STR(str, CG(one_char_string)['1']); + } else { + Z_STR_P(str) = zend_string_init("1", sizeof("1")-1, 0); + Z_TYPE_INFO_P(str) = IS_STRING_EX; + } return; }

« previous php.cvs (#87684) next »