X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=7a83ee7040279e2ea12b7f66768fc7e4ed518915;hb=0295a53a2a0d7b08c078ea9d195ec919c7df2a35;hp=6a879d77f77e51abd2c3230f0761d4d8063f0f54;hpb=952306aca140c014b38ba5eb2ed71dffaa548f0f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index 6a879d7..7a83ee7 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1080,6 +1080,12 @@ PP(pp_aassign) } } } + if (PL_op->op_private & OPpASSIGN_STATE) { + if (SvPADSTALE(*firstlelem)) + SvPADSTALE_off(*firstlelem); + else + RETURN; /* ignore assignment */ + } relem = firstrelem; lelem = firstlelem; @@ -2297,13 +2303,13 @@ PP(pp_subst) #endif rxtainted |= RX_MATCH_TAINTED(rx); dstr = newSVpvn(m, s-m); + SAVEFREESV(dstr); if (DO_UTF8(TARG)) SvUTF8_on(dstr); PL_curpm = pm; if (!c) { register PERL_CONTEXT *cx; SPAGAIN; - (void)ReREFCNT_inc(rx); PUSHSUBST(cx); RETURNOP(cPMOP->op_pmreplroot); } @@ -2354,7 +2360,6 @@ PP(pp_subst) SvLEN_set(TARG, SvLEN(dstr)); doutf8 |= DO_UTF8(dstr); SvPV_set(dstr, NULL); - sv_free(dstr); TAINT_IF(rxtainted & 1); SPAGAIN;