summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorBrandon Black <blblack@gmail.com>2007-04-17 08:14:36 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-19 14:48:20 +0000
commite1a479c5e0c08fb10925261f03573261c69ca0dc (patch)
tree09088fd1ef489ff5660300a532f799144ff7ae6a /sv.c
parent0a311364e00e9bf5b4fcb140ade49b02e46833dd (diff)
downloadperl-e1a479c5e0c08fb10925261f03573261c69ca0dc.tar.gz
Re: new C3 MRO patch
From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index ecea4f9f65..917f806c94 100644
--- a/sv.c
+++ b/sv.c
@@ -3241,7 +3241,7 @@ S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) {
SvREFCNT_dec(GvCV(dstr));
GvCV(dstr) = NULL;
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
- PL_sub_generation++;
+ mro_method_changed_in(GvSTASH(dstr));
}
}
SAVEGENERICSV(*location);
@@ -3287,7 +3287,7 @@ S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) {
}
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
GvASSUMECV_on(dstr);
- PL_sub_generation++;
+ mro_method_changed_in(GvSTASH(dstr)); /* sub foo { 1 } sub bar { 2 } *bar = \&foo */
}
*location = sref;
if (import_flag && !(GvFLAGS(dstr) & import_flag)
@@ -10157,6 +10157,11 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
? (AV*) SvREFCNT_inc(
sv_dup((SV*)saux->xhv_backreferences, param))
: 0;
+
+ daux->xhv_mro_meta = saux->xhv_mro_meta
+ ? mro_meta_dup(saux->xhv_mro_meta, param)
+ : 0;
+
/* Record stashes for possible cloning in Perl_clone(). */
if (hvname)
av_push(param->stashes, dstr);