summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-01-26 15:53:34 +1100
committerTony Cook <tony@develop-help.com>2016-02-02 16:16:59 +1100
commit8452c1a03e174c7b4f513b81f58ac142e290df36 (patch)
treeb69f71817d83dbd3a5c789f34f444b491be8a1f4 /sv.c
parent23895cdc3161aed8a5516d7d1245ddc5b67ddc6b (diff)
downloadperl-8452c1a03e174c7b4f513b81f58ac142e290df36.tar.gz
[perl #127351] add isaelem magic on *Foo::ISA = arrayref
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index e3e5af4dc6..ad2208e52c 100644
--- a/sv.c
+++ b/sv.c
@@ -4184,9 +4184,18 @@ Perl_gv_setref(pTHX_ SV *const dstr, SV *const sstr)
}
else
{
+ SSize_t i;
sv_magic(
sref, omg ? omg->mg_obj : dstr, PERL_MAGIC_isa, NULL, 0
);
+ for (i = 0; i <= AvFILL(sref); ++i) {
+ SV **elem = av_fetch ((AV*)sref, i, 0);
+ if (elem) {
+ sv_magic(
+ *elem, sref, PERL_MAGIC_isaelem, NULL, i
+ );
+ }
+ }
mg = mg_find(sref, PERL_MAGIC_isa);
}
/* Since the *ISA assignment could have affected more than