summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-03-02 15:59:32 +1100
committerFather Chrysostomos <sprout@cpan.org>2015-03-24 22:09:48 -0700
commit16a6e5a4fcd2b316d2d7176996896095732eb3f7 (patch)
tree7d4b7aaa1d817218a0366bf6bf1e0dc2202f0358 /gv.c
parent12cfc3ac0d36a97eddefa925ba09d0b21feb23a0 (diff)
downloadperl-16a6e5a4fcd2b316d2d7176996896095732eb3f7.tar.gz
gv_const_sv() handle subrefs directly in the stash
With 2eaf799e sub declarations can store sub references directly in the stash, but gv_const_sv(), which might be passed an entry from the stash didn't handle that case.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index cdfdc8d9f3..242ea87ed3 100644
--- a/gv.c
+++ b/gv.c
@@ -155,7 +155,7 @@ Perl_gv_const_sv(pTHX_ GV *gv)
if (SvTYPE(gv) == SVt_PVGV)
return cv_const_sv(GvCVu(gv));
- return SvROK(gv) && SvTYPE(SvRV(gv)) != SVt_PVAV ? SvRV(gv) : NULL;
+ return SvROK(gv) && SvTYPE(SvRV(gv)) != SVt_PVAV && SvTYPE(SvRV(gv)) != SVt_PVCV ? SvRV(gv) : NULL;
}
GP *