summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-07-25 17:04:29 +0100
committerNicholas Clark <nick@ccl4.org>2009-07-25 17:04:29 +0100
commit1375cf1cf2085f851bb176047d5e60248542f555 (patch)
treede4ec46b79024f56580ada2036d1f250293c8728 /mro.c
parent7d88e6c43c2bbc666364eda2fbdc0dd431ac3dcf (diff)
downloadperl-1375cf1cf2085f851bb176047d5e60248542f555.tar.gz
When resetting our children, wipe out the isa cache too.
(Fix to change 34354, which introduced a cached hash to make ->isa O(1))
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mro.c b/mro.c
index fe776474d4..23f8c078c8 100644
--- a/mro.c
+++ b/mro.c
@@ -438,7 +438,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
if(meta->mro_nextmethod) hv_clear(meta->mro_nextmethod);
/* Iterate the isarev (classes that are our children),
- wiping out their linearization and method caches */
+ wiping out their linearization, method and isa caches */
if(isarev) {
hv_iterinit(isarev);
while((iter = hv_iternext(isarev))) {
@@ -463,6 +463,10 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
revmeta->cache_gen++;
if(revmeta->mro_nextmethod)
hv_clear(revmeta->mro_nextmethod);
+ if (revmeta->isa) {
+ SvREFCNT_dec(revmeta->isa);
+ revmeta->isa = NULL;
+ }
}
}