com php-src: Fixed ADD_INTERNED_STRING() logic to support strings that are already interned. ( Terry): ext/opcache/zend_persist_calc.c
| From: | Dmitry Stogov | Date: | Thu, 09 Jan 2014 09:48:08 +0000 |
| Subject: | com php-src: Fixed ADD_INTERNED_STRING() logic to support strings that are already interned. ( Terry): ext/opcache/zend_persist_calc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75558@lists.php.net to get a copy of this message | ||
Commit: b5fbde9c5bbfc7acc01f0db40b8b5c8d8d8f6c20
Author: Dmitry Stogov <dmitry@zend.com> Thu, 9 Jan 2014 13:48:08 +0400
Parents: 748e707bf94cf3353616727ade7c3a79ef5de25f
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b5fbde9c5bbfc7acc01f0db40b8b5c8d8d8f6c20
Log:
Fixed ADD_INTERNED_STRING() logic to support strings that are already interned. (Terry)
Changed paths:
M ext/opcache/zend_persist_calc.c
Diff:
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index 9f26a24..e22b7d3 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -33,11 +33,13 @@
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
# define ADD_INTERNED_STRING(str, len) do { \
- const char *tmp = accel_new_interned_string((str), (len), !IS_INTERNED((str)) TSRMLS_CC); \
- if (tmp != (str)) { \
- (str) = (char*)tmp; \
- } else { \
- ADD_DUP_SIZE((str), (len)); \
+ if (!IS_INTERNED(str)) { \
+ const char *tmp = accel_new_interned_string((str), (len), 1 TSRMLS_CC); \
+ if (tmp != (str)) { \
+ (str) = (char*)tmp; \
+ } else { \
+ ADD_DUP_SIZE((str), (len)); \
+ } \
} \
} while (0)
#else