diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-05 14:43:55 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-05 14:43:55 +0000 |
commit | 5509d87acdf3aa5ea39fe6c8e59a42b46a5141cd (patch) | |
tree | b0316cd65a1103e812aebe0a973d29dbc40a839e /regcomp.c | |
parent | 08f18727250f262830d3b2860052d5b5e6083051 (diff) | |
download | perl-5509d87acdf3aa5ea39fe6c8e59a42b46a5141cd.tar.gz |
Abolish RXp_PRELEN(rx) and RXp_WRAPLEN()
Fix up some uses of RX_* macros in the block conditionally compiled
with STUPID_PATTERN_CHECKS.
p4raw-id: //depot/perl@32843
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -4290,12 +4290,12 @@ redo_first_pass: >> RXf_PMf_STD_PMMOD_SHIFT); const char *fptr = STD_PAT_MODS; /*"msix"*/ char *p; - RXp_WRAPLEN(r) = plen + has_minus + has_p + has_runon + RX_WRAPLEN(rx) = plen + has_minus + has_p + has_runon + (sizeof(STD_PAT_MODS) - 1) + (sizeof("(?:)") - 1); - p = sv_grow(rx, RXp_WRAPLEN(r) + 1); - SvCUR_set(rx, RXp_WRAPLEN(r)); + p = sv_grow(rx, RX_WRAPLEN(rx) + 1); + SvCUR_set(rx, RX_WRAPLEN(rx)); SvPOK_on(rx); *p++='('; *p++='?'; if (has_p) @@ -4797,17 +4797,17 @@ reStudy: r->paren_names = NULL; #ifdef STUPID_PATTERN_CHECKS - if (RX_PRELEN(r) == 0) + if (RX_PRELEN(rx) == 0) r->extflags |= RXf_NULL; - if (r->extflags & RXf_SPLIT && RX_PRELEN(r) == 1 && RX_PRECOMP(rx)[0] == ' ') + if (r->extflags & RXf_SPLIT && RX_PRELEN(rx) == 1 && RX_PRECOMP(rx)[0] == ' ') /* XXX: this should happen BEFORE we compile */ r->extflags |= (RXf_SKIPWHITE|RXf_WHITE); - else if (RX_PRELEN(r) == 3 && memEQ("\\s+", RXp_PRECOMP(r), 3)) + else if (RX_PRELEN(rx) == 3 && memEQ("\\s+", RX_PRECOMP(rx), 3)) r->extflags |= RXf_WHITE; - else if (RX_PRELEN(r) == 1 && RXp_PRECOMP(r)[0] == '^') + else if (RX_PRELEN(rx) == 1 && RXp_PRECOMP(rx)[0] == '^') r->extflags |= RXf_START_ONLY; #else - if (r->extflags & RXf_SPLIT && RXp_PRELEN(r) == 1 && RX_PRECOMP(rx)[0] == ' ') + if (r->extflags & RXf_SPLIT && RX_PRELEN(rx) == 1 && RX_PRECOMP(rx)[0] == ' ') /* XXX: this should happen BEFORE we compile */ r->extflags |= (RXf_SKIPWHITE|RXf_WHITE); else { @@ -9264,7 +9264,7 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx) { SV *dsv= sv_newmortal(); RE_PV_QUOTED_DECL(s, (r->extflags & RXf_UTF8), - dsv, RX_PRECOMP(rx), RXp_PRELEN(r), 60); + 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); } |