diff options
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | ext/re/re.xs | 5 | ||||
-rw-r--r-- | pp.c | 4 | ||||
-rw-r--r-- | pp_hot.c | 2 | ||||
-rw-r--r-- | regcomp.c | 4 | ||||
-rw-r--r-- | regexec.c | 6 |
6 files changed, 12 insertions, 11 deletions
@@ -1289,7 +1289,7 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32 = pv_pretty(dsv, RX_WRAPPED(re), RX_WRAPLEN(re), 60, NULL, NULL, ( PERL_PV_PRETTY_QUOTE | PERL_PV_ESCAPE_RE | PERL_PV_PRETTY_ELLIPSES | - ((RX_EXTFLAGS(re) & RXf_UTF8) ? PERL_PV_ESCAPE_UNI : 0)) + (RX_UTF8(re) ? PERL_PV_ESCAPE_UNI : 0)) ); Perl_dump_indent(aTHX_ level+1, file, " PAT = %s\n", s); Perl_dump_indent(aTHX_ level+1, file, " REFCNT = %"IVdf"\n", diff --git a/ext/re/re.xs b/ext/re/re.xs index dc73b755b3..1de1491dc6 100644 --- a/ext/re/re.xs +++ b/ext/re/re.xs @@ -118,7 +118,8 @@ PPCODE: } pattern = sv_2mortal(newSVpvn(RX_PRECOMP(re),RX_PRELEN(re))); - if (RX_EXTFLAGS(re) & RXf_UTF8) SvUTF8_on(pattern); + if (RX_UTF8(re)) + SvUTF8_on(pattern); /* return the pattern and the modifiers */ XPUSHs(pattern); @@ -128,7 +129,7 @@ PPCODE: /* Scalar, so use the string that Perl would return */ /* return the pattern in (?msix:..) format */ pattern = sv_2mortal(newSVpvn(RX_WRAPPED(re),RX_WRAPLEN(re))); - if (RX_EXTFLAGS(re) & RXf_UTF8) + if (RX_UTF8(re)) SvUTF8_on(pattern); XPUSHs(pattern); XSRETURN(1); @@ -4837,7 +4837,7 @@ PP(pp_split) } } } - else if (do_utf8 == ((RX_EXTFLAGS(rx) & RXf_UTF8) != 0) && + else if (do_utf8 == (RX_UTF8(rx) != 0) && (RX_EXTFLAGS(rx) & RXf_USE_INTUIT) && !RX_NPARENS(rx) && (RX_EXTFLAGS(rx) & RXf_CHECK_ALL) && !(RX_EXTFLAGS(rx) & RXf_ANCH)) { @@ -4845,7 +4845,7 @@ PP(pp_split) SV * const csv = CALLREG_INTUIT_STRING(rx); len = RX_MINLENRET(rx); - if (len == 1 && !(RX_EXTFLAGS(rx) & RXf_UTF8) && !tail) { + if (len == 1 && !RX_UTF8(rx) && !tail) { const char c = *SvPV_nolen_const(csv); while (--limit) { for (m = s; m < strend && *m != c; m++) @@ -1322,7 +1322,7 @@ play_it_again: minmatch = had_zerolen; } if (RX_EXTFLAGS(rx) & RXf_USE_INTUIT && - DO_UTF8(TARG) == ((RX_EXTFLAGS(rx) & RXf_UTF8) != 0)) { + DO_UTF8(TARG) == (RX_UTF8(rx) != 0)) { /* FIXME - can PL_bostr be made const char *? */ PL_bostr = (char *)truebase; s = CALLREG_INTUIT_START(rx, TARG, (char *)s, (char *)strend, r_flags, NULL); @@ -9263,7 +9263,7 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx) reginitcolors(); { SV *dsv= sv_newmortal(); - RE_PV_QUOTED_DECL(s, (r->extflags & RXf_UTF8), + RE_PV_QUOTED_DECL(s, RX_UTF8(rx), dsv, RX_PRECOMP(rx), RX_PRELEN(rx), 60); PerlIO_printf(Perl_debug_log,"%sFreeing REx:%s %s\n", PL_colors[4],PL_colors[5],s); @@ -9594,7 +9594,7 @@ Perl_reg_stringify(pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *haseval ) { if (haseval) *haseval = RX_SEEN_EVALS(re); if (flags) - *flags = ((RX_EXTFLAGS(re) & RXf_UTF8) ? 1 : 0); + *flags = RX_UTF8(re) ? 1 : 0; if (lp) *lp = RX_WRAPLEN(re); return RX_WRAPPED(re); @@ -397,7 +397,7 @@ Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV *sv, char *strpos, RX_MATCH_UTF8_set(rx,do_utf8); - if (prog->extflags & RXf_UTF8) { + if (RX_UTF8(rx)) { PL_reg_flags |= RF_utf8; } DEBUG_EXECUTE_r( @@ -1806,7 +1806,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, register char *stre PL_reg_eval_set = 0; PL_reg_maxiter = 0; - if (prog->extflags & RXf_UTF8) + if (RX_UTF8(rx)) PL_reg_flags |= RF_utf8; /* Mark beginning of line for ^ and lookbehind. */ @@ -3805,7 +3805,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) PL_reg_maxiter = 0; ST.toggle_reg_flags = PL_reg_flags; - if (re->extflags & RXf_UTF8) + if (RX_UTF8(re_sv)) PL_reg_flags |= RF_utf8; else PL_reg_flags &= ~RF_utf8; |