diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-10 10:51:07 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-11 10:53:35 -0700 |
commit | 6e314d4f049a1b94d19f8b45006741632f2175a7 (patch) | |
tree | 8a97d9ffb2a320dd6d8b12d00bbaa67167dcf2d7 /gv.c | |
parent | cb0d3385a7bb30bc0aaa2ada8f6f21fe3554ec32 (diff) | |
download | perl-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.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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); |