From 6e314d4f049a1b94d19f8b45006741632f2175a7 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 10 Aug 2013 10:51:07 -0700 Subject: [PATCH] gv.c:newGP: merge some threaded and non-threaded code The previous commit cause the two alternate pieces of code to be nearly identical. --- gv.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/gv.c b/gv.c index 076fafd..f51f782 100644 --- a/gv.c +++ b/gv.c @@ -176,28 +176,20 @@ Perl_newGP(pTHX_ GV *const gv) gp->gp_sv = newSV(0); #endif -#ifdef USE_ITHREADS if (PL_curcop) { gp->gp_line = CopLINE(PL_curcop); /* 0 otherwise Newxz */ +#ifdef USE_ITHREADS if (CopFILE(PL_curcop)) { file = CopFILE(PL_curcop); len = strlen(file); } - else goto no_file; - } - else { - no_file: - file = ""; - len = 0; - } #else - if(PL_curcop) { - gp->gp_line = CopLINE(PL_curcop); /* 0 otherwise Newxz */ filegv = CopFILEGV(PL_curcop); if (filegv) { file = GvNAME(filegv)+2; len = GvNAMELEN(filegv)-2; } +#endif else goto no_file; } else { @@ -205,7 +197,6 @@ Perl_newGP(pTHX_ GV *const gv) file = ""; len = 0; } -#endif PERL_HASH(hash, file, len); gp->gp_file_hek = share_hek(file, len, hash); -- 2.7.4