still problems with backreferences + reverse cloning
Adrian M. Enache [Sat, 10 Jan 2004 20:16:03 +0000 (20:16 +0000)]
after #21936 - the weak reference may live on the pad.

p4raw-id: //depot/perl@22106

sv.c

diff --git a/sv.c b/sv.c
index 995be32..db9490a 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9799,7 +9799,7 @@ Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS* param)
            SvREFCNT_inc(nmg->mg_obj = (SV*)newAV());
            svp = AvARRAY(av);
            for (i = AvFILLp(av); i >= 0; i--) {
-               if (!svp[i] || SvREFCNT(svp[i]) < 2) continue;
+               if (!svp[i]) continue;
                av_push((AV*)nmg->mg_obj,sv_dup(svp[i],param));
            }
        }