diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-10-31 10:43:10 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-31 10:43:10 +0300 |
commit | 2e839246820f36da7eeadf37421457147393cf29 (patch) | |
tree | 7969bdae91b489587a63c102b89914f3df1c4e55 /ext/pcre/php_pcre.c | |
parent | 6de54703f055231603816495c55e6e1924cb5e71 (diff) | |
download | php-git-2e839246820f36da7eeadf37421457147393cf29.tar.gz |
Added zend_hash_add_new_mem/zend_hash_str_add_new_mem. Use them to add new elements into PCRE cache (we checked the existance before).
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 44b5ff55b0..adedcd8d9f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -592,7 +592,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) * See bug #63180 */ if (!ZSTR_IS_INTERNED(key) || !(GC_FLAGS(key) & IS_STR_PERMANENT)) { - pce = zend_hash_str_update_mem(&PCRE_G(pcre_cache), + pce = zend_hash_str_add_new_mem(&PCRE_G(pcre_cache), ZSTR_VAL(key), ZSTR_LEN(key), &new_entry, sizeof(pcre_cache_entry)); #if HAVE_SETLOCALE if (key != regex) { @@ -600,7 +600,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) } #endif } else { - pce = zend_hash_update_mem(&PCRE_G(pcre_cache), key, &new_entry, sizeof(pcre_cache_entry)); + pce = zend_hash_add_new_mem(&PCRE_G(pcre_cache), key, &new_entry, sizeof(pcre_cache_entry)); } return pce; |