diff options
| author | Nikita Popov <nikic@php.net> | 2013-09-13 18:45:02 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2013-09-13 19:42:10 +0200 |
| commit | 96b1c2145c2cd5e616dea191648c2d73af0239c9 (patch) | |
| tree | c9c8ae54ec95874143310c11f05337d7b7de06ad /Zend/zend_builtin_functions.c | |
| parent | d2950ac2791cd03559a58e78f5cd626283b9ee4d (diff) | |
| download | php-git-96b1c2145c2cd5e616dea191648c2d73af0239c9.tar.gz | |
Provide more macros for handling of interned strings
* str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
* str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
* str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
* str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
* str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 1ad64e74ea..a0fa175dcc 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -706,7 +706,7 @@ repeat: zval_ptr_dtor(&val_free); } c.flags = case_sensitive; /* non persistent */ - c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len); + c.name = str_strndup(name, name_len); if(c.name == NULL) { RETURN_FALSE; } |
