mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fixed ADD_INTERNED_STRING() logic to support strings that are already interned. (Terry)
This commit is contained in:
parent
748e707bf9
commit
b5fbde9c5b
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue