Change 34357 by [EMAIL PROTECTED] on 2008/09/12 21:02:55

        In S_mro_get_linear_isa_dfs(), add void casts to silence two warnings
        about "value computed is not used". Re-order the code to group
        operations on the isa hash with each other. Add a SvREADONLY_on() on
        the isa array if it is generated by Perl_get_isa_hash().

Affected files ...

... //depot/perl/mro.c#53 edit

Differences ...

==== //depot/perl/mro.c#53 (text) ====
Index: perl/mro.c
--- perl/mro.c#52~34356~        2008-09-12 02:25:55.000000000 -0700
+++ perl/mro.c  2008-09-12 14:02:55.000000000 -0700
@@ -124,6 +124,8 @@
                             HEK_HASH(canon_name));
            (void) hv_store(isa_hash, "UNIVERSAL", 9, &PL_sv_undef, 0);
 
+           SvREADONLY_on(isa_hash);
+
            meta->isa = isa_hash;
        }
     }
@@ -259,24 +261,26 @@
         }
     }
 
+    (void) hv_store_ent(stored, our_name, &PL_sv_undef, 0);
+    (void) hv_store(stored, "UNIVERSAL", 9, &PL_sv_undef, 0);
+
+    SvREFCNT_inc_simple_void_NN(stored);
+    SvTEMP_off(stored);
+    SvREADONLY_on(stored);
+
+    meta->isa = stored;
+
     /* now that we're past the exception dangers, grab our own reference to
        the AV we're about to use for the result. The reference owned by the
        mortals' stack will be released soon, so everything will balance.  */
     SvREFCNT_inc_simple_void_NN(retval);
     SvTEMP_off(retval);
-    SvREFCNT_inc_simple_void_NN(stored);
-    SvTEMP_off(stored);
-
-    hv_store_ent(stored, our_name, &PL_sv_undef, 0);
-    hv_store(stored, "UNIVERSAL", 9, &PL_sv_undef, 0);
 
     /* we don't want anyone modifying the cache entry but us,
        and we do so by replacing it completely */
     SvREADONLY_on(retval);
-    SvREADONLY_on(stored);
 
     meta->mro_linear_dfs = retval;
-    meta->isa = stored;
     return retval;
 }
 
End of Patch.

Reply via email to