summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-10 10:51:07 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-11 10:53:35 -0700
commit6e314d4f049a1b94d19f8b45006741632f2175a7 (patch)
tree8a97d9ffb2a320dd6d8b12d00bbaa67167dcf2d7 /gv.c
parentcb0d3385a7bb30bc0aaa2ada8f6f21fe3554ec32 (diff)
downloadperl-6e314d4f049a1b94d19f8b45006741632f2175a7.tar.gz
gv.c:newGP: merge some threaded and non-threaded code
The previous commit cause the two alternate pieces of code to be nearly identical.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gv.c b/gv.c
index 076fafd76e..f51f782486 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);