Lines Matching refs:subpat_names

526 static void free_subpats_table(zend_string **subpat_names, uint32_t num_subpats) {  in free_subpats_table()  argument
529 if (subpat_names[i]) { in free_subpats_table()
530 zend_string_release_ex(subpat_names[i], false); in free_subpats_table()
533 efree(subpat_names); in free_subpats_table()
541 zend_string **subpat_names; in make_subpats_table() local
551 subpat_names = ecalloc(num_subpats, sizeof(zend_string *)); in make_subpats_table()
555 subpat_names[name_idx] = zend_string_init(name, strlen(name), 0); in make_subpats_table()
556 …if (is_numeric_string(ZSTR_VAL(subpat_names[name_idx]), ZSTR_LEN(subpat_names[name_idx]), NULL, NU… in make_subpats_table()
558 free_subpats_table(subpat_names, num_subpats); in make_subpats_table()
563 return subpat_names; in make_subpats_table()
1020 zval *subpats, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, in populate_subpat_array() argument
1027 if (subpat_names) { in populate_subpat_array()
1032 subpat_names[i], unmatched_as_null); in populate_subpat_array()
1036 add_offset_pair(subpats_ht, NULL, PCRE2_UNSET, PCRE2_UNSET, subpat_names[i], 1); in populate_subpat_array()
1043 if (subpat_names[i]) { in populate_subpat_array()
1044 add_named(subpats_ht, subpat_names[i], &val, offsets[2*i] == PCRE2_UNSET); in populate_subpat_array()
1051 if (subpat_names[i]) { in populate_subpat_array()
1052 zend_hash_add(subpats_ht, subpat_names[i], &val); in populate_subpat_array()
1147 zend_string **subpat_names; /* Array for named subpatterns */ in php_pcre_match_impl() local
1214 subpat_names = NULL; in php_pcre_match_impl()
1216 subpat_names = make_subpats_table(num_subpats, pce); in php_pcre_match_impl()
1217 if (!subpat_names) { in php_pcre_match_impl()
1231 if (subpat_names) { in php_pcre_match_impl()
1232 free_subpats_table(subpat_names, num_subpats); in php_pcre_match_impl()
1280 if (subpat_names) { in php_pcre_match_impl()
1281 free_subpats_table(subpat_names, num_subpats); in php_pcre_match_impl()
1342 &result_set, subject, offsets, subpat_names, in php_pcre_match_impl()
1351 subpats, subject, offsets, subpat_names, num_subpats, count, mark, flags); in php_pcre_match_impl()
1420 if (subpat_names) { in php_pcre_match_impl()
1424 if (subpat_names[i]) { in php_pcre_match_impl()
1425 zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], &wrapper); in php_pcre_match_impl()
1446 if (subpat_names) { in php_pcre_match_impl()
1447 free_subpats_table(subpat_names, num_subpats); in php_pcre_match_impl()
1541 …o_cache *fcc, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, uint32_t num_s… in preg_do_repl_func() argument
1548 populate_subpat_array(&arg, subject, offsets, subpat_names, num_subpats, count, mark, flags); in preg_do_repl_func()
1847 zend_string **subpat_names; /* Array for named subpatterns */ in php_pcre_replace_func_impl() local
1868 subpat_names = NULL; in php_pcre_replace_func_impl()
1870 subpat_names = make_subpats_table(num_subpats, pce); in php_pcre_replace_func_impl()
1871 if (!subpat_names) { in php_pcre_replace_func_impl()
1894 if (subpat_names) { in php_pcre_replace_func_impl()
1895 free_subpats_table(subpat_names, num_subpats); in php_pcre_replace_func_impl()
1948 fci, fcc, subject, offsets, subpat_names, num_subpats, count, in php_pcre_replace_func_impl()
2047 if (UNEXPECTED(subpat_names)) { in php_pcre_replace_func_impl()
2048 free_subpats_table(subpat_names, num_subpats); in php_pcre_replace_func_impl()