From a8f60ac9dd3ba8fed24370799603b92487fdf362 Mon Sep 17 00:00:00 2001 From: Sergei Turchanov Date: Tue, 8 Oct 2019 17:55:07 +1000 Subject: Add pcre_get_compiled_regex_cache_ex() with local_aware flag A new function `pcre_get_compiled_regex_cache_ex()` is introduced, which allows to compile regexp pattern using the "C" locale instead of a current locale. This will be needed to replace setlocale() usage in fileinfo, which is not thread-safe. --- ext/pcre/php_pcre.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/pcre/php_pcre.h') diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 137cce5a9e..62edb29da8 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -57,6 +57,7 @@ typedef struct { } pcre_cache_entry; PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex); +PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, int locale_aware); PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, zval *subpats, int global, int use_flags, zend_long flags, zend_long start_offset); -- cgit v1.2.1