This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Call SvMAGICAL_off in mg_free
authorBram <perl-rt@wizbit.be>
Mon, 5 May 2008 16:18:56 +0000 (18:18 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 10 May 2008 19:57:59 +0000 (19:57 +0000)
Message-ID: <20080505161856.pgz4pjga1w44ksk4@horde.wizbit.be>

p4raw-id: //depot/perl@33815

mg.c
sv.c

diff --git a/mg.c b/mg.c
index 25abdce..f3e6ae9 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -532,6 +532,7 @@ Perl_mg_free(pTHX_ SV *sv)
        SvMAGIC_set(sv, moremagic);
     }
     SvMAGIC_set(sv, NULL);
+    SvMAGICAL_off(sv);
     return 0;
 }
 
diff --git a/sv.c b/sv.c
index 44307d4..716c2ee 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3553,7 +3553,6 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags)
     {
        /* need to nuke the magic */
        mg_free(dstr);
-       SvRMAGICAL_off(dstr);
     }
 
     /* There's a lot of redundancy below but we're going for speed here */