[svn:parrot] r49660 - trunk/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Mon Oct 25 03:15:06 UTC 2010


Author: chromatic
Date: Mon Oct 25 03:15:05 2010
New Revision: 49660
URL: https://trac.parrot.org/parrot/changeset/49660

Log:
Initialize custom mark and destroy flags in thawed objects. It's required because ImageIO uses pmc_new_noinit which doesn't initialize these flags

Modified:
   trunk/src/pmc/fixedpmcarray.pmc
   trunk/src/pmc/hash.pmc

Modified: trunk/src/pmc/fixedpmcarray.pmc
==============================================================================
--- trunk/src/pmc/fixedpmcarray.pmc	Mon Oct 25 03:15:00 2010	(r49659)
+++ trunk/src/pmc/fixedpmcarray.pmc	Mon Oct 25 03:15:05 2010	(r49660)
@@ -730,13 +730,13 @@
     }
 
     VTABLE void freeze(PMC *info) {
-        SUPER(info);
         VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF));
     }
 
     VTABLE void thaw(PMC *info) {
-        SUPER(info);
         SELF.set_integer_native(VTABLE_shift_integer(INTERP, info));
+        /* Thawed array was created from pmc_new_noinit */
+        PObj_custom_mark_destroy_SETALL(SELF);
     }
 
 /*

Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc	Mon Oct 25 03:15:00 2010	(r49659)
+++ trunk/src/pmc/hash.pmc	Mon Oct 25 03:15:05 2010	(r49660)
@@ -1201,6 +1201,8 @@
 
     VTABLE void thaw(PMC *info) {
         SELF.set_pointer((void *)Parrot_hash_thaw(INTERP, info));
+        /* Thawed Hash was created from pmc_new_noinit */
+        PObj_custom_mark_destroy_SETALL(SELF);
     }
 }
 


More information about the parrot-commits mailing list