[svn:parrot] r39881 - trunk/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sat Jul 4 18:34:39 UTC 2009


Author: whiteknight
Date: Sat Jul  4 18:34:38 2009
New Revision: 39881
URL: https://trac.parrot.org/parrot/changeset/39881

Log:
[gc] use mem_allocate_zeroed_typed instead of mem_allocate_typed + memset. Suggested to me by ... everybody who saw my r39879. fperrad++, pmichaud++, Infinoid++

Modified:
   trunk/src/oo.c
   trunk/src/pmc.c

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	Sat Jul  4 16:43:43 2009	(r39880)
+++ trunk/src/oo.c	Sat Jul  4 18:34:38 2009	(r39881)
@@ -300,8 +300,7 @@
     PObj_is_object_SET(cloned);
 
     /* Now create the underlying structure, and clone attributes list.class. */
-    cloned_guts               = mem_allocate_typed(Parrot_Object_attributes);
-    memset(cloned_guts, 0, sizeof(Parrot_Object_attributes));
+    cloned_guts               = mem_allocate_zeroed_typed(Parrot_Object_attributes);
     PMC_data(cloned)          = cloned_guts;
     cloned_guts->_class       = obj->_class;
     cloned_guts->attrib_store = VTABLE_clone(interp, obj->attrib_store);

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Sat Jul  4 16:43:43 2009	(r39880)
+++ trunk/src/pmc.c	Sat Jul  4 18:34:38 2009	(r39881)
@@ -864,6 +864,7 @@
 
 */
 
+PARROT_EXPORT
 void
 gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
 {


More information about the parrot-commits mailing list