diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-01 02:40:39 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-01 02:40:39 +0300 |
commit | 0056f52f500f9056039e8976e1100c9f154daa75 (patch) | |
tree | 87388515ebb378f5a17d6c60fc4e033e742a1b9d | |
parent | 8897c80956377b607837bd2ca18e38812671c691 (diff) | |
download | php-git-0056f52f500f9056039e8976e1100c9f154daa75.tar.gz |
Use interned strings for hash algorithm names (not copyied into SHM)
-rw-r--r-- | ext/hash/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 5932ad9c6a..9819a6e7ed 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -98,7 +98,7 @@ PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *o { size_t algo_len = strlen(algo); char *lower = zend_str_tolower_dup(algo, algo_len); - zend_hash_str_add_ptr(&php_hash_hashtable, lower, algo_len, (void *) ops); + zend_hash_add_ptr(&php_hash_hashtable, zend_string_init_interned(lower, algo_len, 1), (void *) ops); efree(lower); } /* }}} */ |