summaryrefslogtreecommitdiff
path: root/Zend/zend_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_string.h')
-rw-r--r--Zend/zend_string.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/Zend/zend_string.h b/Zend/zend_string.h
index c95578d4a5..4ede3f0381 100644
--- a/Zend/zend_string.h
+++ b/Zend/zend_string.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2018 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,7 +39,6 @@ ZEND_API void zend_interned_strings_dtor(void);
ZEND_API void zend_interned_strings_activate(void);
ZEND_API void zend_interned_strings_deactivate(void);
ZEND_API void zend_interned_strings_set_request_storage_handlers(zend_new_interned_string_func_t handler, zend_string_init_interned_func_t init_handler);
-ZEND_API void zend_interned_strings_set_permanent_storage_copy_handlers(zend_string_copy_storage_func_t copy_handler, zend_string_copy_storage_func_t restore_handler);
ZEND_API void zend_interned_strings_switch_storage(zend_bool request);
ZEND_API extern zend_string *zend_empty_string;
@@ -80,7 +79,7 @@ END_EXTERN_C()
(str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE_EX(_ZSTR_STRUCT_SIZE(_len), 8), (use_heap)); \
GC_SET_REFCOUNT(str, 1); \
GC_TYPE_INFO(str) = IS_STRING; \
- zend_string_forget_hash_val(str); \
+ ZSTR_H(str) = 0; \
ZSTR_LEN(str) = _len; \
} while (0)
@@ -102,6 +101,7 @@ static zend_always_inline zend_ulong zend_string_hash_val(zend_string *s)
static zend_always_inline void zend_string_forget_hash_val(zend_string *s)
{
ZSTR_H(s) = 0;
+ GC_DEL_FLAGS(s, IS_STR_VALID_UTF8);
}
static zend_always_inline uint32_t zend_string_refcount(const zend_string *s)
@@ -134,7 +134,7 @@ static zend_always_inline zend_string *zend_string_alloc(size_t len, int persist
GC_SET_REFCOUNT(ret, 1);
GC_TYPE_INFO(ret) = IS_STRING | ((persistent ? IS_STR_PERSISTENT : 0) << GC_FLAGS_SHIFT);
- zend_string_forget_hash_val(ret);
+ ZSTR_H(ret) = 0;
ZSTR_LEN(ret) = len;
return ret;
}
@@ -145,7 +145,7 @@ static zend_always_inline zend_string *zend_string_safe_alloc(size_t n, size_t m
GC_SET_REFCOUNT(ret, 1);
GC_TYPE_INFO(ret) = IS_STRING | ((persistent ? IS_STR_PERSISTENT : 0) << GC_FLAGS_SHIFT);
- zend_string_forget_hash_val(ret);
+ ZSTR_H(ret) = 0;
ZSTR_LEN(ret) = (n * m) + l;
return ret;
}
@@ -337,7 +337,7 @@ static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_str
* constants, prime or not, has never been adequately explained by
* anyone. So I try an explanation: if one experimentally tests all
* multipliers between 1 and 256 (as RSE did now) one detects that even
- * numbers are not useable at all. The remaining 128 odd numbers
+ * numbers are not usable at all. The remaining 128 odd numbers
* (except for the number 1) work more or less all equally well. They
* all distribute in an acceptable way and this way fill a hash table
* with an average percent of approx. 86%.
@@ -452,13 +452,3 @@ ZEND_KNOWN_STRINGS(_ZEND_STR_ID)
} zend_known_string_id;
#endif /* ZEND_STRING_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */