diff options
author | Artur Bergman <sky@nanisky.com> | 2001-06-30 03:18:16 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-30 13:00:24 +0000 |
commit | c74e5284dc2e0dcda5959a5a6ebd0b82a082ddad (patch) | |
tree | 4092267efff6a01d245cd444d808590866596b18 /sv.c | |
parent | 14cf881c49354abdedb2f64b4fde446a92185e9f (diff) | |
download | perl-c74e5284dc2e0dcda5959a5a6ebd0b82a082ddad.tar.gz |
weakref fix 2, not yet there
Message-ID: <B762D957.1CC9%artur@contiller.se>
p4raw-id: //depot/perl@11040
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -8628,6 +8628,18 @@ S_gv_share(pTHX_ SV *sstr) else if (!GvCV(gv)) { GvCV(gv) = (CV*)sv; } + else if(mg->mg_type == PERL_MAGIC_backref) { + AV *av = (AV*) mg->mg_obj; + SV **svp; + I32 i; + nmg->mg_obj = (SV*)newAV(); + svp = AvARRAY(av); + i = AvFILLp(av); + while (i >= 0) { + av_push((AV*)nmg->mg_obj,sv_dup(svp[i],param)); + i--; + } + } else { /* CvPADLISTs cannot be shared */ if (!CvXSUB(GvCV(gv))) { |