From: Vincent Pit Date: Fri, 24 Apr 2009 22:27:40 +0000 (+0200) Subject: Remove the fake context namesv workaround introduced in fbcb2462798d2fa931a5c97ebf0ce... X-Git-Tag: v0.35~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=8045d029a0db4e3128d18f64f97d63e406034f47;p=perl%2Fmodules%2FVariable-Magic.git Remove the fake context namesv workaround introduced in fbcb2462798d2fa931a5c97ebf0cec73177dce23, as 135abb4d38a3a9eab3a7e6d6cde33aafd62488c2 also fixes the issue in a better way --- diff --git a/Magic.xs b/Magic.xs index c2d8f65..c925143 100644 --- a/Magic.xs +++ b/Magic.xs @@ -876,18 +876,6 @@ STATIC int vmg_svt_free(pTHX_ SV *sv, MAGIC *mg) { FREETMPS; LEAVE; - if (has_err) { - /* Get the eval context that was pushed by call_sv, and fake an entry for the - * namesv, as die_where will need it to be non NULL later */ - PERL_CONTEXT *cx; - if (cxstack_ix >= cxstack_max) - Perl_cxinc(aTHX); - cx = cxstack + cxstack_ix + 1; - if (!cx->blk_eval.old_namesv) - cx->blk_eval.old_namesv - = sv_2mortal(newSVpvn_share("Variable/Magic/DUMMY.pm", 23, 0)); - } - /* Calling SvREFCNT_dec() will trigger destructors in an infinite loop, so * we have to rely on SvREFCNT() being a lvalue. Heck, even the core does it */ --SvREFCNT(sv);