Author: chromatic
Date: Fri Jun  8 14:35:42 2007
New Revision: 18887

Modified:
   trunk/src/pmc/smop_class.pmc

Log:
[PMC] Fix a segfault in GC by removing the "I'm an array, really!" flag.

Also tidied the init() method a bit.

Modified: trunk/src/pmc/smop_class.pmc
==============================================================================
--- trunk/src/pmc/smop_class.pmc        (original)
+++ trunk/src/pmc/smop_class.pmc        Fri Jun  8 14:35:42 2007
@@ -98,12 +98,10 @@
         SMOP_Class *smop;
         /* But we are a class, really */
         PObj_is_class_SET(SELF);
-        /* turn on marking of the class_data array */
-        PObj_data_is_PMC_array_SET(SELF);
         /* turn on custom destruction since our PMC* array is dynamically 
allocated */
         PObj_active_destroy_SET(SELF);
 
-        PMC_data(SELF) = mem_sys_allocate_zeroed(sizeof(SMOP_Class));
+        PMC_data(SELF)      = mem_allocate_zeroed_typed(SMOP_Class);
         smop                = SMOP(SELF);
         smop->attributes    = pmc_new(interp, enum_class_Hash);
         smop->methods       = pmc_new(interp, enum_class_Hash);

Reply via email to