diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-04-01 16:31:03 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-01 16:31:03 +0400 |
commit | a25a1ba0ef263e9e1d65b8eaebd3e764878c55c7 (patch) | |
tree | 978ef72e0c909146687f463f5066e3d9672eb5ce /Zend/zend_string.h | |
parent | 7eff369ba94f244604669f4b0e9737dc06265f43 (diff) | |
download | php-git-a25a1ba0ef263e9e1d65b8eaebd3e764878c55c7.tar.gz |
STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used.
Diffstat (limited to 'Zend/zend_string.h')
-rw-r--r-- | Zend/zend_string.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 8c93ef48ac..3a94ba03e8 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -125,11 +125,11 @@ static zend_always_inline zend_string *zend_str_copy(zend_string *s) static zend_always_inline zend_string *zend_str_dup(zend_string *s, int persistent) { -//??? if (IS_INTERNED(s)) { -//??? return s; -//??? } else { + if (IS_INTERNED(s)) { + return s; + } else { return STR_INIT(s->val, s->len, persistent); -//??? } + } } static zend_always_inline zend_string *zend_str_realloc(zend_string *s, int len, int persistent) |