summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/gv.c
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2015-04-25 19:14:50 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2015-04-25 19:14:50 +0000
commit3db0c96927b00fc26e05bb455381d6c6a21a0509 (patch)
treec02fd4db0e9501c47b2f132b96b25b2198174539 /gnu/usr.bin/perl/gv.c
parentc036cc150b888a1343d3224d3ab1815181e7797b (diff)
Fix merge issues, remove excess files - match perl-5.20.2 dist
Diffstat (limited to 'gnu/usr.bin/perl/gv.c')
-rw-r--r--gnu/usr.bin/perl/gv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/gv.c b/gnu/usr.bin/perl/gv.c
index e402f6bf72f..ce6847842c7 100644
--- a/gnu/usr.bin/perl/gv.c
+++ b/gnu/usr.bin/perl/gv.c
@@ -1202,7 +1202,7 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags)
* use that, but for lack of anything better we will use the sub's
* original package to look up $AUTOLOAD.
*/
- varstash = GvSTASH(CvGV(cv));
+ varstash = CvNAMED(cv) ? CvSTASH(cv) : GvSTASH(CvGV(cv));
vargv = *(GV**)hv_fetch(varstash, S_autoload, S_autolen, TRUE);
ENTER;
@@ -2544,7 +2544,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
numifying instead of C's "+0". */
gv = Perl_gv_fetchmeth_pvn(aTHX_ stash, cooky, l, -1, 0);
cv = 0;
- if (gv && (cv = GvCV(gv))) {
+ if (gv && (cv = GvCV(gv)) && CvGV(cv)) {
if(GvNAMELEN(CvGV(cv)) == 3 && strEQ(GvNAME(CvGV(cv)), "nil")){
const char * const hvname = HvNAME_get(GvSTASH(CvGV(cv)));
if (hvname && HEK_LEN(HvNAME_HEK(GvSTASH(CvGV(cv)))) == 8