X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=aabdff582b148a6cd8a13a441b67748791c790e9;hb=5cd24f17b72b10f8506d70fba1ec4dd25224c257;hp=4f41374c6db1b13c1ea2fe78cc7caf598e94c908;hpb=daff0e373f3630eaa9dbded0adcc04185f454487;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index 4f41374..aabdff5 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -119,9 +119,6 @@ PP(pp_substcont) if (!cx->sb_rxtainted) cx->sb_rxtainted = SvTAINTED(TOPs); sv_catsv(dstr, POPs); - if (rx->subbase) - Safefree(rx->subbase); - rx->subbase = cx->sb_subbase; /* Are we done */ if (cx->sb_once || !pregexec(rx, s, cx->sb_strend, orig, @@ -139,10 +136,10 @@ PP(pp_substcont) SvLEN_set(targ, SvLEN(dstr)); SvPVX(dstr) = 0; sv_free(dstr); - (void)SvPOK_only(targ); SvSETMAGIC(targ); SvTAINT(targ); + PUSHs(sv_2mortal(newSViv((I32)cx->sb_iters - 1))); LEAVE_SCOPE(cx->sb_oldsave); POPSUBST(cx); @@ -159,10 +156,7 @@ PP(pp_substcont) cx->sb_m = m = rx->startp[0]; sv_catpvn(dstr, s, m-s); cx->sb_s = rx->endp[0]; - cx->sb_subbase = rx->subbase; cx->sb_rxtainted |= rx->exec_tainted; - - rx->subbase = Nullch; /* so recursion works */ RETURNOP(pm->op_pmreplstart); }