Lines Matching refs:pce

168 	pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data);  in php_free_pcre_cache()  local
169 if (!pce) return; in php_free_pcre_cache()
170 if (pce->subpats_table) { in php_free_pcre_cache()
171 free_subpats_table(pce->subpats_table, pce->capture_count + 1); in php_free_pcre_cache()
173 pcre2_code_free(pce->re); in php_free_pcre_cache()
174 free(pce); in php_free_pcre_cache()
494 pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data); in pcre_clean_cache() local
497 if (!pce->refcount) { in pcre_clean_cache()
519 static zend_string **make_subpats_table(uint32_t name_cnt, pcre_cache_entry *pce) in make_subpats_table() argument
521 uint32_t num_subpats = pce->capture_count + 1; in make_subpats_table()
527 rc1 = pcre2_pattern_info(pce->re, PCRE2_INFO_NAMETABLE, &name_table); in make_subpats_table()
528 rc2 = pcre2_pattern_info(pce->re, PCRE2_INFO_NAMEENTRYSIZE, &name_size); in make_subpats_table()
554 static zend_always_inline size_t calculate_unit_length(pcre_cache_entry *pce, const char *start) in calculate_unit_length() argument
558 if (pce->compile_options & PCRE2_UTF) { in calculate_unit_length()
896 pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex); in pcre_get_compiled_regex() local
899 *capture_count = pce ? pce->capture_count : 0; in pcre_get_compiled_regex()
902 return pce ? pce->re : NULL; in pcre_get_compiled_regex()
1108 pcre_cache_entry *pce; /* Compiled regular expression */ in php_do_pcre_match() local
1123 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) { in php_do_pcre_match()
1132 pce->refcount++; in php_do_pcre_match()
1133 php_pcre_match_impl(pce, subject, return_value, subpats, in php_do_pcre_match()
1135 pce->refcount--; in php_do_pcre_match()
1156 PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, in php_pcre_match_impl() argument
1228 num_subpats = pce->capture_count + 1; in php_pcre_match_impl()
1236 subpat_names = pce->subpats_table; in php_pcre_match_impl()
1245 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_match_impl()
1265 (pce->compile_options & PCRE2_UTF) && !is_known_valid_utf8(subject_str, orig_start_offset) in php_pcre_match_impl()
1270 if ((pce->preg_options & PREG_JIT) && options) { in php_pcre_match_impl()
1271 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset2, in php_pcre_match_impl()
1275 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset2, in php_pcre_match_impl()
1375 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset2, in php_pcre_match_impl()
1389 size_t unit_len = calculate_unit_length(pce, subject + start_offset2); in php_pcre_match_impl()
1413 if ((pce->preg_options & PREG_JIT)) { in php_pcre_match_impl()
1418 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset2, in php_pcre_match_impl()
1422 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset2, in php_pcre_match_impl()
1459 if ((pce->compile_options & PCRE2_UTF) in php_pcre_match_impl()
1487 pcre_cache_entry *pce; variable
1488 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) {
1492 pce->refcount++;
1493 php_pcre_match_impl(pce, subject, return_value, /* subpats */ NULL,
1495 pce->refcount--;
1589 pcre_cache_entry *pce; /* Compiled regular expression */ in php_pcre_replace() local
1598 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) { in php_pcre_replace()
1601 pce->refcount++; in php_pcre_replace()
1602 result = php_pcre_replace_impl(pce, subject_str, subject, subject_len, replace_str, in php_pcre_replace()
1604 pce->refcount--; in php_pcre_replace()
1611 PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, const ch… in php_pcre_replace_impl() argument
1633 num_subpats = pce->capture_count + 1; in php_pcre_replace_impl()
1647 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_replace_impl()
1654 options = (pce->compile_options & PCRE2_UTF) ? 0 : PCRE2_NO_UTF_CHECK; in php_pcre_replace_impl()
1661 if ((pce->preg_options & PREG_JIT) && options) { in php_pcre_replace_impl()
1662 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_impl()
1666 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_impl()
1783 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_impl()
1795 size_t unit_len = calculate_unit_length(pce, piece); in php_pcre_replace_impl()
1835 if (pce->preg_options & PREG_JIT) { in php_pcre_replace_impl()
1836 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_impl()
1840 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_impl()
1852 static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_string *subject_str, con… in php_pcre_replace_func_impl() argument
1871 num_subpats = pce->capture_count + 1; in php_pcre_replace_func_impl()
1872 subpat_names = pce->subpats_table; in php_pcre_replace_func_impl()
1889 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_replace_func_impl()
1897 options = (pce->compile_options & PCRE2_UTF) ? 0 : PCRE2_NO_UTF_CHECK; in php_pcre_replace_func_impl()
1904 if ((pce->preg_options & PREG_JIT) && options) { in php_pcre_replace_func_impl()
1905 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_func_impl()
1909 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_func_impl()
1978 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_func_impl()
1990 size_t unit_len = calculate_unit_length(pce, piece); in php_pcre_replace_func_impl()
2029 if ((pce->preg_options & PREG_JIT)) { in php_pcre_replace_func_impl()
2030 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_func_impl()
2034 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, subject_len, start_offset, in php_pcre_replace_func_impl()
2052 pcre_cache_entry *pce; /* Compiled regular expression */ in php_pcre_replace_func() local
2056 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) { in php_pcre_replace_func()
2059 pce->refcount++; in php_pcre_replace_func()
2061 pce, subject_str, ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), fci, fcc, in php_pcre_replace_func()
2063 pce->refcount--; in php_pcre_replace_func()
2531 pcre_cache_entry *pce; /* Compiled regular expression */ in PHP_FUNCTION() local
2543 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) { in PHP_FUNCTION()
2547 pce->refcount++; in PHP_FUNCTION()
2548 php_pcre_split_impl(pce, subject, return_value, limit_val, flags); in PHP_FUNCTION()
2549 pce->refcount--; in PHP_FUNCTION()
2554 PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, in php_pcre_split_impl() argument
2578 num_subpats = pce->capture_count + 1; in php_pcre_split_impl()
2596 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_split_impl()
2604 options = (pce->compile_options & PCRE2_UTF) ? 0 : PCRE2_NO_UTF_CHECK; in php_pcre_split_impl()
2610 if ((pce->preg_options & PREG_JIT) && options) { in php_pcre_split_impl()
2611 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, ZSTR_LEN(subject_str), start_offset, in php_pcre_split_impl()
2615 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, ZSTR_LEN(subject_str), start_offset, in php_pcre_split_impl()
2678 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, ZSTR_LEN(subject_str), start_offset, in php_pcre_split_impl()
2688 start_offset += calculate_unit_length(pce, subject + start_offset); in php_pcre_split_impl()
2711 if (pce->preg_options & PREG_JIT) { in php_pcre_split_impl()
2712 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)subject, ZSTR_LEN(subject_str), start_offset, in php_pcre_split_impl()
2716 count = pcre2_match(pce->re, (PCRE2_SPTR)subject, ZSTR_LEN(subject_str), start_offset, in php_pcre_split_impl()
2890 pcre_cache_entry *pce; /* Compiled regular expression */ in PHP_FUNCTION() local
2901 if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) { in PHP_FUNCTION()
2905 pce->refcount++; in PHP_FUNCTION()
2906 php_pcre_grep_impl(pce, input, return_value, flags); in PHP_FUNCTION()
2907 pce->refcount--; in PHP_FUNCTION()
2911 PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return_value, zend_long f… in php_pcre_grep_impl() argument
2925 num_subpats = pce->capture_count + 1; in php_pcre_grep_impl()
2936 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_grep_impl()
2943 options = (pce->compile_options & PCRE2_UTF) ? 0 : PCRE2_NO_UTF_CHECK; in php_pcre_grep_impl()
2952 if ((pce->preg_options & PREG_JIT) && options) { in php_pcre_grep_impl()
2953 count = pcre2_jit_match(pce->re, (PCRE2_SPTR)ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), 0, in php_pcre_grep_impl()
2957 count = pcre2_match(pce->re, (PCRE2_SPTR)ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), 0, in php_pcre_grep_impl()
3059 PHPAPI void php_pcre_pce_incref(pcre_cache_entry *pce) in php_pcre_pce_incref() argument
3061 assert(NULL != pce); in php_pcre_pce_incref()
3062 pce->refcount++; in php_pcre_pce_incref()
3065 PHPAPI void php_pcre_pce_decref(pcre_cache_entry *pce) in php_pcre_pce_decref() argument
3067 assert(NULL != pce); in php_pcre_pce_decref()
3068 assert(0 != pce->refcount); in php_pcre_pce_decref()
3069 pce->refcount--; in php_pcre_pce_decref()
3072 PHPAPI pcre2_code *php_pcre_pce_re(pcre_cache_entry *pce) in php_pcre_pce_re() argument
3074 assert(NULL != pce); in php_pcre_pce_re()
3075 return pce->re; in php_pcre_pce_re()