Call setmagic on the referent we are blessing.
Artur Bergman [Tue, 23 Oct 2001 18:27:27 +0000 (18:27 +0000)]
p4raw-id: //depot/perl@12607

sv.c

diff --git a/sv.c b/sv.c
index 6a6c33b..ecf86e5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -7205,6 +7205,8 @@ Perl_sv_bless(pTHX_ SV *sv, HV *stash)
     else
        SvAMAGIC_off(sv);
 
+    SvSETMAGIC(tmpRef);
     return sv;
 }