diff options
author | Rick Delaney <rick@consumercontact.com> | 2008-01-09 08:36:55 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-11 10:42:13 +0000 |
commit | 52b4506763c1e322f848f17908bebdf7672f168e (patch) | |
tree | 50379905e343a88fea99bebab56c5148b688f0e3 /mg.c | |
parent | 4b48cf39454aea22003054f8b0a85963f328fe30 (diff) | |
download | perl-52b4506763c1e322f848f17908bebdf7672f168e.tar.gz |
Re: [perl #49564] Re: MRO and av_clear
Message-ID: <20080109183655.GB11282@bort.ca>
p4raw-id: //depot/perl@32948
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -1553,6 +1553,29 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg) } int +Perl_magic_clearisa(pTHX_ SV *sv, MAGIC *mg) +{ + dVAR; + HV* stash; + + /* Bail out if destruction is going on */ + if(PL_dirty) return 0; + + av_clear((AV*)sv); + + /* XXX see comments in magic_setisa */ + stash = GvSTASH( + SvTYPE(mg->mg_obj) == SVt_PVGV + ? (GV*)mg->mg_obj + : (GV*)SvMAGIC(mg->mg_obj)->mg_obj + ); + + mro_isa_changed_in(stash); + + return 0; +} + +int Perl_magic_setamagic(pTHX_ SV *sv, MAGIC *mg) { dVAR; |