]> granicus.if.org Git - php/commitdiff
IS_INTERNED is not always 0 in ZTS
authorNikita Popov <nikic@php.net>
Wed, 9 Apr 2014 21:54:03 +0000 (23:54 +0200)
committerNikita Popov <nikic@php.net>
Wed, 9 Apr 2014 21:54:03 +0000 (23:54 +0200)
The current implementation chooses to intern "" in ZTS. Either that
should be removed or IS_INTERNED needs to actually check the flag.

Zend/zend_string.h

index 3072afd32210839bcd41a9b3c50652f12c93ca99..6ff35fb22c50282577c2b5e543cbd77a3b489592 100644 (file)
@@ -35,11 +35,7 @@ void zend_interned_strings_dtor(TSRMLS_D);
 
 END_EXTERN_C()
 
-#ifndef ZTS
-# define IS_INTERNED(s)                                        (GC_FLAGS(s) & IS_STR_INTERNED)
-#else
-# define IS_INTERNED(s)                                        0
-#endif
+#define IS_INTERNED(s)                                 (GC_FLAGS(s) & IS_STR_INTERNED)
 
 #define STR_HASH_VAL(s)                                        zend_str_hash_val(s)
 #define STR_FORGET_HASH_VAL(s)                 zend_str_forget_hash_val(s)