From 3f769473038509212bbed7cb49d6b7e21009311f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 7 May 2020 18:45:03 +0200 Subject: Rename locale_string to ctype_string To make it more obvious that this only refers to the LC_CTYPE locale. --- ext/pcre/php_pcre.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index a5e806b30c..611a18bd48 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -595,10 +595,10 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in zend_string *key; pcre_cache_entry *ret; - if (locale_aware && BG(locale_string) && - (ZSTR_LEN(BG(locale_string)) != 1 && ZSTR_VAL(BG(locale_string))[0] != 'C')) { + if (locale_aware && BG(ctype_string) && + (ZSTR_LEN(BG(ctype_string)) != 1 && ZSTR_VAL(BG(ctype_string))[0] != 'C')) { key = zend_string_concat2( - ZSTR_VAL(BG(locale_string)), ZSTR_LEN(BG(locale_string)), + ZSTR_VAL(BG(ctype_string)), ZSTR_LEN(BG(ctype_string)), ZSTR_VAL(regex), ZSTR_LEN(regex)); } else { key = regex; @@ -757,7 +757,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in } if (key != regex) { - tables = (uint8_t *)zend_hash_find_ptr(&char_tables, BG(locale_string)); + tables = (uint8_t *)zend_hash_find_ptr(&char_tables, BG(ctype_string)); if (!tables) { zend_string *_k; tables = pcre2_maketables(gctx); @@ -768,7 +768,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in efree(pattern); return NULL; } - _k = zend_string_init(ZSTR_VAL(BG(locale_string)), ZSTR_LEN(BG(locale_string)), 1); + _k = zend_string_init(ZSTR_VAL(BG(ctype_string)), ZSTR_LEN(BG(ctype_string)), 1); GC_MAKE_PERSISTENT_LOCAL(_k); zend_hash_add_ptr(&char_tables, _k, (void *)tables); zend_string_release(_k); -- cgit v1.2.1