summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-12-08 11:02:04 +0200
committerJarkko Hietaniemi <jhi@iki.fi>1998-12-29 11:27:11 +0000
commitad94a51148da69b36625e16c155cd6147ed14f1a (patch)
tree81185c6bda2609aafa161d1fb093e26315fe3d4b /pp_hot.c
parent54b6e2faa887aa86b7b0c280adebcdc0f0804c55 (diff)
downloadperl-ad94a51148da69b36625e16c155cd6147ed14f1a.tar.gz
Bugs in hairy interactions of feature in REx
To: perl5-porters@perl.org (Mailing list Perl5) Message-ID: <MLIST_199812080637.BAA16025@monk.mps.ohio-state.edu> \G fixes (wasn't working right with //g, s///, and $_ in (?{})). p4raw-id: //depot/cfgperl@2515
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 329af8bd88..b53842775e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -874,6 +874,8 @@ PP(pp_match)
if (rx->minlen > len) goto failure;
truebase = t = s;
+
+ /* XXXX What part of this is needed with true \G-support? */
if (global = pm->op_pmflags & PMf_GLOBAL) {
rx->startp[0] = 0;
if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG)) {
@@ -993,6 +995,7 @@ play_it_again:
if (rx->startp[0] && rx->startp[0] == rx->endp[0])
++rx->endp[0];
PUTBACK; /* EVAL blocks may use stack */
+ r_flags |= REXEC_IGNOREPOS;
goto play_it_again;
}
else if (!iters)
@@ -1827,6 +1830,7 @@ PP(pp_subst)
PUSHSUBST(cx);
RETURNOP(cPMOP->op_pmreplroot);
}
+ r_flags |= REXEC_IGNOREPOS;
do {
if (iters++ > maxiters)
DIE("Substitution loop");
@@ -1845,7 +1849,7 @@ PP(pp_subst)
sv_catpvn(dstr, c, clen);
if (once)
break;
- } while (CALLREGEXEC(rx, s, strend, orig, s == m, Nullsv, NULL, r_flags));
+ } while (CALLREGEXEC(rx, s, strend, orig, s == m, TARG, NULL, r_flags));
sv_catpvn(dstr, s, strend - s);
(void)SvOOK_off(TARG);