[svn:parrot] r44231 - branches/sys_mem_reduce/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Feb 20 12:18:12 UTC 2010


Author: bacek
Date: Sat Feb 20 12:18:12 2010
New Revision: 44231
URL: https://trac.parrot.org/parrot/changeset/44231

Log:
Switch OrderedHash to auto_attrs

Modified:
   branches/sys_mem_reduce/src/pmc/orderedhash.pmc

Modified: branches/sys_mem_reduce/src/pmc/orderedhash.pmc
==============================================================================
--- branches/sys_mem_reduce/src/pmc/orderedhash.pmc	Sat Feb 20 12:17:52 2010	(r44230)
+++ branches/sys_mem_reduce/src/pmc/orderedhash.pmc	Sat Feb 20 12:18:12 2010	(r44231)
@@ -153,7 +153,7 @@
 }
 
 
-pmclass OrderedHash need_ext provides array provides hash {
+pmclass OrderedHash need_ext provides array provides hash auto_attrs {
     ATTR PMC    *hash;   /* key to item tuple */
     ATTR PMC    *first;  /* Pointer to first inserted value  */
     ATTR PMC    *last;   /* Pointer to last inserted value   */
@@ -170,9 +170,8 @@
 
     VTABLE void init() {
         Parrot_OrderedHash_attributes * const attrs =
-                mem_allocate_zeroed_typed(Parrot_OrderedHash_attributes);
+                (Parrot_OrderedHash_attributes*) PMC_data(SELF);
 
-        PMC_data(SELF)  = attrs;
         attrs->hash     = pmc_new(INTERP, enum_class_Hash);
         attrs->first    = PMCNULL;
         attrs->last     = PMCNULL;


More information about the parrot-commits mailing list