com php-src: Use one_char_string: Zend/zend_operators .c
| From: | Xinchen Hui | Date: | Thu, 02 Jul 2015 04:18:23 +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-87685@lists.php.net to get a copy of this message | ||
Commit: 0e68e278546b186484310261d95716ac45a13b6e
Author: Xinchen Hui <laruence@php.net> Thu, 2 Jul 2015 12:18:23 +0800
Parents: 70d7ecfec6e6d415bf0c5226c500213469fc56b0
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e68e278546b186484310261d95716ac45a13b6e
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 a669cc2..7ab9e5b 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -797,7 +797,11 @@ try_again:
case IS_FALSE:
return ZSTR_EMPTY_ALLOC();
case IS_TRUE:
- return zend_string_init("1", 1, 0);
+ if (CG(one_char_string)['1']) {
+ return CG(one_char_string)['1'];
+ } else {
+ return zend_string_init("1", 1, 0);
+ }
case IS_RESOURCE: {
char buf[sizeof("Resource id #") + MAX_LENGTH_OF_LONG];
int len;