match_data = mdata;
} else {
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
- }
- if (!match_data) {
- PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
- if (subpat_names) {
- efree(subpat_names);
- }
- if (match_sets) {
- efree(match_sets);
+ if (!match_data) {
+ PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
+ if (subpat_names) {
+ efree(subpat_names);
+ }
+ if (match_sets) {
+ efree(match_sets);
+ }
+ RETURN_FALSE;
}
- RETURN_FALSE;
}
do {
break;
}
count = pcre2_jit_match(pce->re, subject, subject_len, start_offset2,
- no_utf_check|g_notempty, match_data, mctx);
+ PCRE2_NO_UTF_CHECK, match_data, mctx);
} else
#endif
count = pcre2_match(pce->re, subject, subject_len, start_offset2,
match_data = mdata;
} else {
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
- }
- if (!match_data) {
- PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
- if (subpat_names) {
- efree(subpat_names);
+ if (!match_data) {
+ PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
+ if (subpat_names) {
+ efree(subpat_names);
+ }
+ return NULL;
}
- return NULL;
}
while (1) {
if (PCRE_G(jit) && (pce->preg_options & PREG_JIT)
&& no_utf_check && !g_notempty) {
count = pcre2_jit_match(pce->re, subject, subject_len, start_offset,
- no_utf_check|g_notempty, match_data, mctx);
+ PCRE2_NO_UTF_CHECK, match_data, mctx);
} else
#endif
count = pcre2_match(pce->re, subject, subject_len, start_offset,
match_data = mdata;
} else {
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
- }
- if (!match_data) {
- PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
- if (subpat_names) {
- efree(subpat_names);
+ if (!match_data) {
+ PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
+ if (subpat_names) {
+ efree(subpat_names);
+ }
+ mdata_used = old_mdata_used;
+ return NULL;
}
- mdata_used = old_mdata_used;
- return NULL;
}
while (1) {
if (PCRE_G(jit) && (pce->preg_options & PREG_JIT)
&& no_utf_check && !g_notempty) {
count = pcre2_jit_match(pce->re, subject, subject_len, start_offset,
- no_utf_check|g_notempty, match_data, mctx);
+ PCRE2_NO_UTF_CHECK, match_data, mctx);
} else
#endif
count = pcre2_match(pce->re, subject, subject_len, start_offset,
match_data = mdata;
} else {
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
- }
- if (!match_data) {
- PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
- return;
+ if (!match_data) {
+ PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
+ return;
+ }
}
/* Get next piece if no limit or limit not yet reached and something matched*/
if (PCRE_G(jit) && (pce->preg_options & PREG_JIT)
&& no_utf_check && !g_notempty) {
count = pcre2_jit_match(pce->re, ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), start_offset,
- no_utf_check|g_notempty, match_data, mctx);
+ PCRE2_NO_UTF_CHECK, match_data, mctx);
} else
#endif
count = pcre2_match(pce->re, ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), start_offset,
match_data = mdata;
} else {
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
- }
- if (!match_data) {
- PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
- return;
+ if (!match_data) {
+ PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
+ return;
+ }
}
/* Go through the input array */
if (PCRE_G(jit) && (pce->preg_options && PREG_JIT)
&& no_utf_check) {
count = pcre2_jit_match(pce->re, ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), 0,
- no_utf_check, match_data, mctx);
+ PCRE2_NO_UTF_CHECK, match_data, mctx);
} else
#endif
count = pcre2_match(pce->re, ZSTR_VAL(subject_str), ZSTR_LEN(subject_str), 0,