This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "toke.c:incline: Avoid duplicate symbol lookup"
authorFather Chrysostomos <sprout@cpan.org>
Fri, 9 Aug 2013 21:44:35 +0000 (14:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 10 Aug 2013 02:28:34 +0000 (19:28 -0700)
This reverts commit 05c9917c892c03577828027ff71c6282a2eabe29.

This is in preparation for reverting c82ecf346, which will remove the
CopFILEGV_set macro under threads.

toke.c

diff --git a/toke.c b/toke.c
index 911fb94..7c24eae 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1754,7 +1754,6 @@ S_incline(pTHX_ const char *s)
     if (t - s > 0) {
        const STRLEN len = t - s;
        GV * const cfgv = CopFILEGV(PL_curcop);
-       GV *gv2 = NULL;
 
        if (cfgv && !PL_rsfp && !PL_parser->filtered) {
            /* must copy *{"::_<(eval N)[oldfilename:L]"}
@@ -1764,6 +1763,7 @@ S_incline(pTHX_ const char *s)
                char smallbuf[128];
                STRLEN tmplen2 = len;
                char *tmpbuf2;
+               GV *gv2;
 
                if (tmplen2 + 2 <= sizeof smallbuf)
                    tmpbuf2 = smallbuf;
@@ -1805,8 +1805,7 @@ S_incline(pTHX_ const char *s)
                if (tmpbuf2 != smallbuf) Safefree(tmpbuf2);
        }
        CopFILE_free(PL_curcop);
-       if (gv2) CopFILEGV_set(PL_curcop, gv2);
-       else CopFILE_setn(PL_curcop, s, len);
+       CopFILE_setn(PL_curcop, s, len);
     }
     CopLINE_set(PL_curcop, line_num);
 }