Rename a wrong-named test file
[gitmo/Mouse.git] / xs-src / Mouse.xs
index 955ab2f..619844b 100644 (file)
@@ -717,12 +717,10 @@ CODE:
 
     len      = AvFILLp(demolishall) + 1;
     if(len > 0){
-        GV* const statusvalue = gv_fetchpvs("?", 0, SVt_PV);
+        SV* const in_global_destruction = boolSV(PL_dirty);
+        SAVEI32(PL_statusvalue); /* local $? */
+        PL_statusvalue = 0;
 
-        if(statusvalue){ /* it can be NULL */
-            SAVESPTR(GvSV(statusvalue)); /* local $? */
-            GvSV(statusvalue) = sv_newmortal();
-        }
         SAVESPTR(ERRSV); /* local $@ */
         ERRSV = sv_newmortal();
 
@@ -733,7 +731,7 @@ CODE:
 
             PUSHMARK(SP);
             PUSHs(object);
-            PUSHs(boolSV(PL_dirty));
+            PUSHs(in_global_destruction);
             PUTBACK;
 
             call_sv(AvARRAY(demolishall)[i], G_VOID | G_EVAL);