Re: [perl #44623] Optimized magic_setisa has bug
Rick Delaney [Thu, 6 Sep 2007 14:40:39 +0000 (10:40 -0400)]
Message-ID: <20070906184039.GG9260@bort.ca>

p4raw-id: //depot/perl@31838

pp_hot.c
t/mro/basic.t

index 05b9b16..0f78125 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1005,6 +1005,8 @@ PP(pp_aassign)
                }
                TAINT_NOT;
            }
+           if (PL_delaymagic & DM_ARRAY)
+               SvSETMAGIC((SV*)ary);
            break;
        case SVt_PVHV: {                                /* normal hash */
                SV *tmpstr;
@@ -1122,9 +1124,6 @@ PP(pp_aassign)
            PL_egid = PerlProc_getegid();
        }
        PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
-
-       if (PL_delaymagic & DM_ARRAY && SvMAGICAL((SV*)ary))
-           mg_set((SV*)ary);
     }
     PL_delaymagic = 0;
 
index f23fabe..695306c 100644 (file)
@@ -160,10 +160,7 @@ is(eval { MRO_N->testfunc() }, 123);
     ok(eq_array(mro::get_linear_isa('ISACLEAR2'),[qw/ISACLEAR2 YY ZZ/]));
     (@ISACLEAR1::ISA, @ISACLEAR2::ISA) = ();
 
-    {
-        local our $TODO = 1;
-        ok(eq_array(mro::get_linear_isa('ISACLEAR1'),[qw/ISACLEAR1/]));
-    }
+    ok(eq_array(mro::get_linear_isa('ISACLEAR1'),[qw/ISACLEAR1/]));
     ok(eq_array(mro::get_linear_isa('ISACLEAR2'),[qw/ISACLEAR2/]));
 }