Propagate const/mutable/not into the SvPV call for retrieving an
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index 11c81bd..31a3ebc 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -755,6 +755,9 @@ Perl_leave_scope(pTHX_ I32 base)
            gv = (GV*)SSPOPPTR;
            if (GvAV(gv)) {
                AV * const goner = GvAV(gv);
+               /* FIXME - this is a temporary hack until we work out what
+                  the correct behaviour for magic should be.  */
+               sv_unmagic((SV*)goner, PERL_MAGIC_arylen_p);
                SvMAGIC_set(av, SvMAGIC(goner));
                SvFLAGS((SV*)av) |= SvMAGICAL(goner);
                SvMAGICAL_off(goner);