mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Use one_char_string
This commit is contained in:
parent
0e68e27854
commit
ba711aec30
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue