summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-10-26 05:40:10 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-10-26 05:40:10 -0700
commite17aed30f88453e866224b8226836acc4cbc3824 (patch)
treeefcf36f310f90d5d993f7462f430d03aab1e9918 /gv.c
parenta854082c1ddc5c6bb8d493a0cc4930601215559b (diff)
downloadperl-e17aed30f88453e866224b8226836acc4cbc3824.tar.gz
gv:gv_add_by_type: Don’t check @ISA when not vivifying
I added the code (in 986d39eeb4) to magicalise @ISA when vivifying it via @{*ISA}. But we don’t need to do that every time gv_add_by_type is called, just when it is autovivifying.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 9f0b57e6a5..476afc547c 100644
--- a/gv.c
+++ b/gv.c
@@ -82,10 +82,12 @@ Perl_gv_add_by_type(pTHX_ GV *gv, svtype type)
}
if (!*where)
+ {
*where = newSV_type(type);
- if (type == SVt_PVAV && GvNAMELEN(gv) == 3
- && strnEQ(GvNAME(gv), "ISA", 3))
- sv_magic(*where, (SV *)gv, PERL_MAGIC_isa, NULL, 0);
+ if (type == SVt_PVAV && GvNAMELEN(gv) == 3
+ && strnEQ(GvNAME(gv), "ISA", 3))
+ sv_magic(*where, (SV *)gv, PERL_MAGIC_isa, NULL, 0);
+ }
return gv;
}