summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.h
diff options
context:
space:
mode:
authorSergei Turchanov <turchanov@farpost.com>2019-10-08 17:55:07 +1000
committerNikita Popov <nikita.ppv@gmail.com>2019-10-08 16:11:55 +0200
commita8f60ac9dd3ba8fed24370799603b92487fdf362 (patch)
tree8a3ccd6f61297728d6ffca60742b12b07598a595 /ext/pcre/php_pcre.h
parent46894580b06c1ba630a804ff0bbb9e61076720f4 (diff)
downloadphp-git-a8f60ac9dd3ba8fed24370799603b92487fdf362.tar.gz
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.
Diffstat (limited to 'ext/pcre/php_pcre.h')
-rw-r--r--ext/pcre/php_pcre.h1
1 files changed, 1 insertions, 0 deletions
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);