Lines Matching refs:subpat_names

528 static void free_subpats_table(zend_string **subpat_names, uint32_t num_subpats) {  in free_subpats_table()  argument
531 if (subpat_names[i]) { in free_subpats_table()
532 zend_string_release(subpat_names[i]); in free_subpats_table()
535 efree(subpat_names); in free_subpats_table()
543 zend_string **subpat_names; in make_subpats_table() local
553 subpat_names = ecalloc(num_subpats, sizeof(zend_string *)); in make_subpats_table()
557 subpat_names[name_idx] = zend_string_init(name, strlen(name), 0); in make_subpats_table()
558 …if (is_numeric_string(ZSTR_VAL(subpat_names[name_idx]), ZSTR_LEN(subpat_names[name_idx]), NULL, NU… in make_subpats_table()
560 free_subpats_table(subpat_names, num_subpats); in make_subpats_table()
565 return subpat_names; in make_subpats_table()
1028 zval *subpats, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, in populate_subpat_array() argument
1034 if (subpat_names) { in populate_subpat_array()
1039 subpat_names[i], unmatched_as_null); in populate_subpat_array()
1043 add_offset_pair(subpats, NULL, PCRE2_UNSET, PCRE2_UNSET, subpat_names[i], 1); in populate_subpat_array()
1050 if (subpat_names[i]) { in populate_subpat_array()
1051 add_named(subpats, subpat_names[i], &val, offsets[2*i] == PCRE2_UNSET); in populate_subpat_array()
1058 if (subpat_names[i]) { in populate_subpat_array()
1059 zend_hash_add(Z_ARRVAL_P(subpats), subpat_names[i], &val); in populate_subpat_array()
1155 zend_string **subpat_names; /* Array for named subpatterns */ in php_pcre_match_impl() local
1224 subpat_names = NULL; in php_pcre_match_impl()
1226 subpat_names = make_subpats_table(num_subpats, pce); in php_pcre_match_impl()
1227 if (!subpat_names) { in php_pcre_match_impl()
1249 if (subpat_names) { in php_pcre_match_impl()
1250 free_subpats_table(subpat_names, num_subpats); in php_pcre_match_impl()
1292 if (subpat_names) { in php_pcre_match_impl()
1293 free_subpats_table(subpat_names, num_subpats); in php_pcre_match_impl()
1348 &result_set, subject, offsets, subpat_names, in php_pcre_match_impl()
1357 subpats, subject, offsets, subpat_names, num_subpats, count, mark, flags); in php_pcre_match_impl()
1426 if (subpat_names) { in php_pcre_match_impl()
1428 if (subpat_names[i]) { in php_pcre_match_impl()
1429 zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], &match_sets[i]); 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()
1517 …o_cache *fcc, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, uint32_t num_s… in preg_do_repl_func() argument
1524 populate_subpat_array(&arg, subject, offsets, subpat_names, num_subpats, count, mark, flags); in preg_do_repl_func()
1825 zend_string **subpat_names; /* Array for named subpatterns */ in php_pcre_replace_func_impl() local
1846 subpat_names = NULL; in php_pcre_replace_func_impl()
1848 subpat_names = make_subpats_table(num_subpats, pce); in php_pcre_replace_func_impl()
1849 if (!subpat_names) { in php_pcre_replace_func_impl()
1872 if (subpat_names) { in php_pcre_replace_func_impl()
1873 free_subpats_table(subpat_names, num_subpats); in php_pcre_replace_func_impl()
1925 fci, fcc, subject, offsets, subpat_names, num_subpats, count, in php_pcre_replace_func_impl()
2024 if (UNEXPECTED(subpat_names)) { in php_pcre_replace_func_impl()
2025 free_subpats_table(subpat_names, num_subpats); in php_pcre_replace_func_impl()