In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e32ff4e1e2b9fb64a8d68add6913fc04e4b3152e?hp=1a419e6b1ae911c99a8ca065071290a8ba070856>

- Log -----------------------------------------------------------------
commit e32ff4e1e2b9fb64a8d68add6913fc04e4b3152e
Author: Father Chrysostomos <[email protected]>
Date:   Fri Sep 12 20:22:27 2014 -0700

    pp_ctl.c: Remove PL_curcop assignment
    
    This was added years ago in commit 7fb6a879.  Now that save_re_context
    does nothing (and die_unwind no longer even calls it), we don’t need to
    assign to PL_curcop.  In the case where it matters, that is, the implicit
    eval scope that require provides, the values of PL_curcop and oldcop
    should always be the same.
-----------------------------------------------------------------------

Summary of changes:
 pp_ctl.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/pp_ctl.c b/pp_ctl.c
index 0f69f97..429143f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1614,7 +1614,9 @@ Perl_die_unwind(pTHX_ SV *msv)
            SV *namesv;
            PERL_CONTEXT *cx;
            SV **newsp;
+#ifdef DEBUGGING
            COP *oldcop;
+#endif DEBUGGING
            JMPENV *restartjmpenv;
            OP *restartop;
 
@@ -1631,7 +1633,9 @@ Perl_die_unwind(pTHX_ SV *msv)
            }
            POPEVAL(cx);
            namesv = cx->blk_eval.old_namesv;
+#ifdef DEBUGGING
            oldcop = cx->blk_oldcop;
+#endif DEBUGGING
            restartjmpenv = cx->blk_eval.cur_top_env;
            restartop = cx->blk_eval.retop;
 
@@ -1641,13 +1645,8 @@ Perl_die_unwind(pTHX_ SV *msv)
 
            LEAVE;
 
-           /* LEAVE could clobber PL_curcop (see save_re_context())
-            * XXX it might be better to find a way to avoid messing with
-            * PL_curcop in save_re_context() instead, but this is a more
-            * minimal fix --GSAR */
-           PL_curcop = oldcop;
-
            if (optype == OP_REQUIRE) {
+                assert (PL_curcop == oldcop);
                 (void)hv_store(GvHVn(PL_incgv),
                                SvPVX_const(namesv),
                                SvUTF8(namesv) ? -(I32)SvCUR(namesv) : 
(I32)SvCUR(namesv),

--
Perl5 Master Repository

Reply via email to