summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-02 12:06:05 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-02 12:06:05 +0000
commit07bc277f32c1d7aff237dd3f55d558b5d4b93314 (patch)
tree86a4a36156c095e618d07cc5cb6d35875496d75f /regexec.c
parent3d66076ad00dfe06380fb774b92fb59dc07fe4ec (diff)
downloadperl-07bc277f32c1d7aff237dd3f55d558b5d4b93314.tar.gz
Wrap all deferences of struct regexp* in macros RX_*() [and for
regcomp.c and regexec.c RXp_* where necessary] so that in future we can maintain source compatibility when we add an extra level of dereferencing. p4raw-id: //depot/perl@32802
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regexec.c b/regexec.c
index 724b8708ea..59fc53e051 100644
--- a/regexec.c
+++ b/regexec.c
@@ -536,7 +536,7 @@ Perl_re_intuit_start(pTHX_ REGEXP * const prog, SV *sv, char *strpos,
else
goto fail_finish;
/* we may be pointing at the wrong string */
- if (s && RX_MATCH_COPIED(prog))
+ if (s && RXp_MATCH_COPIED(prog))
s = strbeg + (s - SvPVX_const(sv));
if (data)
*data->scream_olds = s;
@@ -2009,7 +2009,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const prog, char *stringarg, register char *st
(unsigned char*)strend, must,
multiline ? FBMrf_MULTILINE : 0))) ) {
/* we may be pointing at the wrong string */
- if ((flags & REXEC_SCREAM) && RX_MATCH_COPIED(prog))
+ if ((flags & REXEC_SCREAM) && RXp_MATCH_COPIED(prog))
s = strbeg + (s - SvPVX_const(sv));
DEBUG_EXECUTE_r( did_match = 1 );
if (HOPc(s, -back_max) > last1) {
@@ -2087,7 +2087,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const prog, char *stringarg, register char *st
if (!last)
last = scream_olds; /* Only one occurrence. */
/* we may be pointing at the wrong string */
- else if (RX_MATCH_COPIED(prog))
+ else if (RXp_MATCH_COPIED(prog))
s = strbeg + (s - SvPVX_const(sv));
}
else {
@@ -2264,7 +2264,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
PM_SETRE(PL_reg_curpm, prog);
PL_reg_oldcurpm = PL_curpm;
PL_curpm = PL_reg_curpm;
- if (RX_MATCH_COPIED(prog)) {
+ if (RXp_MATCH_COPIED(prog)) {
/* Here is a serious problem: we cannot rewrite subbeg,
since it may be needed if this match fails. Thus
$` inside (?{}) could fail... */
@@ -2273,7 +2273,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
#ifdef PERL_OLD_COPY_ON_WRITE
PL_nrs = prog->saved_copy;
#endif
- RX_MATCH_COPIED_off(prog);
+ RXp_MATCH_COPIED_off(prog);
}
else
PL_reg_oldsaved = NULL;
@@ -2558,7 +2558,7 @@ S_debug_start_match(pTHX_ const regexp *prog, const bool do_utf8,
reginitcolors();
{
RE_PV_QUOTED_DECL(s0, utf8_pat, PERL_DEBUG_PAD_ZERO(0),
- RX_PRECOMP(prog), RX_PRELEN(prog), 60);
+ RXp_PRECOMP(prog), RXp_PRELEN(prog), 60);
RE_PV_QUOTED_DECL(s1, do_utf8, PERL_DEBUG_PAD_ZERO(1),
start, end - start, 60);
@@ -3762,7 +3762,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
PL_regsize = osize;
}
}
- RX_MATCH_COPIED_off(re);
+ RXp_MATCH_COPIED_off(re);
re->subbeg = rex->subbeg;
re->sublen = rex->sublen;
rei = RXi_GET(re);
@@ -5880,7 +5880,7 @@ restore_pos(pTHX_ void *arg)
#ifdef PERL_OLD_COPY_ON_WRITE
rex->saved_copy = PL_nrs;
#endif
- RX_MATCH_COPIED_on(rex);
+ RXp_MATCH_COPIED_on(rex);
}
PL_reg_magic->mg_len = PL_reg_oldpos;
PL_reg_eval_set = 0;