summaryrefslogtreecommitdiff
path: root/Zend/zend_string.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-10-06 18:36:26 +0200
committerAnatol Belski <ab@php.net>2014-10-06 18:36:26 +0200
commitbd9f17846df5ca7c7f606e4392f02861523b7cd5 (patch)
tree280d445b62fb1a0d5655facdeb554184e665d3fc /Zend/zend_string.c
parent60f0695a0982c556c826191d28c8ba3a72fd2a2b (diff)
parent5d7ccb758b407d1ba6bc7502b22ebb7cfcd2912c (diff)
downloadphp-git-bd9f17846df5ca7c7f606e4392f02861523b7cd5.tar.gz
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: bring back the correct php_version.h fix the empty_strings SAPI shutdown leak in TS build Use fastcall calling convention for heap functions fix leaking the empty_string in TS builds remove successive assignment
Diffstat (limited to 'Zend/zend_string.c')
-rw-r--r--Zend/zend_string.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Zend/zend_string.c b/Zend/zend_string.c
index a4455e8da9..1833bbd241 100644
--- a/Zend/zend_string.c
+++ b/Zend/zend_string.c
@@ -45,9 +45,9 @@ static void _str_dtor(zval *zv)
void zend_interned_strings_init(TSRMLS_D)
{
+#ifndef ZTS
zend_string *str;
-#ifndef ZTS
zend_hash_init(&CG(interned_strings), 1024, NULL, _str_dtor, 1);
CG(interned_strings).nTableMask = CG(interned_strings).nTableSize - 1;
@@ -59,12 +59,6 @@ void zend_interned_strings_init(TSRMLS_D)
str = zend_string_alloc(sizeof("")-1, 1);
str->val[0] = '\000';
CG(empty_string) = zend_new_interned_string_int(str TSRMLS_CC);
-#else
- str = zend_string_alloc(sizeof("")-1, 1);
- str->val[0] = '\000';
- zend_string_hash_val(str);
- str->gc.u.v.flags |= IS_STR_INTERNED;
- CG(empty_string) = str;
#endif
/* one char strings (the actual interned strings are going to be created by ext/opcache) */
@@ -79,8 +73,6 @@ void zend_interned_strings_dtor(TSRMLS_D)
{
#ifndef ZTS
zend_hash_destroy(&CG(interned_strings));
-#else
- zend_string_release(CG(empty_string));
#endif
}