summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 13:54:38 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 13:54:38 +0000
commitefd26800e76b6f876fd6abe3a3f7e3e4128150a9 (patch)
tree3cee09b657aa4fbb21fef6d06429fb5c40ada62c /regcomp.c
parent5a51db0500cb91f11a554807ca60350bc43f0e5b (diff)
downloadperl-efd26800e76b6f876fd6abe3a3f7e3e4128150a9.tar.gz
Add RX_UTF8(), which is effectively SvUTF8() but for regexps.
Remove RXp_PRECOMP() and RXp_WRAPPED(). Change the parameter of S_debug_start_match() from regexp to REGEXP. Change its callers [the only part wrong for 5.10.x] p4raw-id: //depot/perl@32840
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regcomp.c b/regcomp.c
index b7fd317248..33ed6fc9d0 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4294,8 +4294,8 @@ redo_first_pass:
+ (sizeof(STD_PAT_MODS) - 1)
+ (sizeof("(?:)") - 1);
- Newx(RXp_WRAPPED(r), RXp_WRAPLEN(r) + 1, char );
- p = RXp_WRAPPED(r);
+ Newx(RX_WRAPPED(rx), RXp_WRAPLEN(r) + 1, char );
+ p = RX_WRAPPED(rx);
*p++='('; *p++='?';
if (has_p)
*p++ = KEEPCOPY_PAT_MOD; /*'p'*/
@@ -4319,8 +4319,8 @@ redo_first_pass:
*p++ = ':';
Copy(RExC_precomp, p, plen, char);
- assert ((RXp_WRAPPED(r) - p) < 16);
- r->pre_prefix = p - RXp_WRAPPED(r);
+ assert ((RX_WRAPPED(rx) - p) < 16);
+ r->pre_prefix = p - RX_WRAPPED(rx);
p += plen;
if (has_runon)
*p++ = '\n';
@@ -4798,7 +4798,7 @@ reStudy:
#ifdef STUPID_PATTERN_CHECKS
if (RX_PRELEN(r) == 0)
r->extflags |= RXf_NULL;
- if (r->extflags & RXf_SPLIT && RX_PRELEN(r) == 1 && RXp_PRECOMP(r)[0] == ' ')
+ if (r->extflags & RXf_SPLIT && RX_PRELEN(r) == 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))
@@ -4806,7 +4806,7 @@ reStudy:
else if (RX_PRELEN(r) == 1 && RXp_PRECOMP(r)[0] == '^')
r->extflags |= RXf_START_ONLY;
#else
- if (r->extflags & RXf_SPLIT && RXp_PRELEN(r) == 1 && RXp_PRECOMP(r)[0] == ' ')
+ if (r->extflags & RXf_SPLIT && RXp_PRELEN(r) == 1 && RX_PRECOMP(rx)[0] == ' ')
/* XXX: this should happen BEFORE we compile */
r->extflags |= (RXf_SKIPWHITE|RXf_WHITE);
else {
@@ -9159,7 +9159,7 @@ Perl_pregfree2(pTHX_ REGEXP *rx)
CALLREGFREE_PVT(rx); /* free the private data */
if (r->paren_names)
SvREFCNT_dec(r->paren_names);
- Safefree(RXp_WRAPPED(r));
+ Safefree(RX_WRAPPED(rx));
}
if (r->substrs) {
if (r->anchored_substr)
@@ -9258,7 +9258,7 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx)
{
SV *dsv= sv_newmortal();
RE_PV_QUOTED_DECL(s, (r->extflags & RXf_UTF8),
- dsv, RXp_PRECOMP(r), RXp_PRELEN(r), 60);
+ dsv, RX_PRECOMP(rx), RXp_PRELEN(r), 60);
PerlIO_printf(Perl_debug_log,"%sFreeing REx:%s %s\n",
PL_colors[4],PL_colors[5],s);
}