summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorBrandon Black <blblack@gmail.com>2007-04-29 12:27:03 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-30 09:22:58 +0000
commitdd69841bebe1fc7f7a6b248576221520a0418d52 (patch)
tree03f70519210b8c576d1dde888623afef3e9882ba /hv.c
parent49d7dfbcef7527d25e8c34643f831ef2416923a3 (diff)
downloadperl-dd69841bebe1fc7f7a6b248576221520a0418d52.tar.gz
Re: mro status, etc
From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 1bde70e3cd..6243979d0e 100644
--- a/hv.c
+++ b/hv.c
@@ -1608,6 +1608,8 @@ Perl_hv_clear(pTHX_ HV *hv)
HvREHASH_off(hv);
reset:
if (SvOOK(hv)) {
+ if(HvNAME_get(hv))
+ mro_isa_changed_in(hv);
HvEITER_set(hv, NULL);
}
}
@@ -1756,7 +1758,6 @@ S_hfreeentries(pTHX_ HV *hv)
if((meta = iter->xhv_mro_meta)) {
if(meta->mro_linear_dfs) SvREFCNT_dec(meta->mro_linear_dfs);
if(meta->mro_linear_c3) SvREFCNT_dec(meta->mro_linear_c3);
- if(meta->mro_isarev) SvREFCNT_dec(meta->mro_isarev);
if(meta->mro_nextmethod) SvREFCNT_dec(meta->mro_nextmethod);
Safefree(meta);
iter->xhv_mro_meta = NULL;
@@ -1845,8 +1846,12 @@ Perl_hv_undef(pTHX_ HV *hv)
return;
DEBUG_A(Perl_hv_assert(aTHX_ hv));
xhv = (XPVHV*)SvANY(hv);
+
+ if ((name = HvNAME_get(hv)) && !PL_dirty)
+ mro_isa_changed_in(hv);
+
hfreeentries(hv);
- if ((name = HvNAME_get(hv))) {
+ if (name) {
if(PL_stashcache)
hv_delete(PL_stashcache, name, HvNAMELEN_get(hv), G_DISCARD);
hv_name_set(hv, NULL, 0, 0);