summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-06-30 03:18:16 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-30 13:00:24 +0000
commitc74e5284dc2e0dcda5959a5a6ebd0b82a082ddad (patch)
tree4092267efff6a01d245cd444d808590866596b18 /sv.c
parent14cf881c49354abdedb2f64b4fde446a92185e9f (diff)
downloadperl-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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index cc8fe4af62..207b955aed 100644
--- a/sv.c
+++ b/sv.c
@@ -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))) {