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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sat Apr 24 18:22:26 UTC 2010


Author: NotFound
Date: Sat Apr 24 18:22:26 2010
New Revision: 45992
URL: https://trac.parrot.org/parrot/changeset/45992

Log:
clean FIA.clone

Modified:
   trunk/src/pmc/fixedintegerarray.pmc

Modified: trunk/src/pmc/fixedintegerarray.pmc
==============================================================================
--- trunk/src/pmc/fixedintegerarray.pmc	Sat Apr 24 17:56:52 2010	(r45991)
+++ trunk/src/pmc/fixedintegerarray.pmc	Sat Apr 24 18:22:26 2010	(r45992)
@@ -110,16 +110,16 @@
         GET_ATTR_int_array(INTERP, SELF, int_array);
 
         if (int_array) {
-            INTVAL      *dest_int_array;
-            INTVAL       size;
-
+            INTVAL size;
             GET_ATTR_size(INTERP, SELF, size);
-
-            dest_int_array = mem_gc_allocate_n_typed(INTERP, size, INTVAL);
+            {
+                INTVAL * const dest_int_array = mem_gc_allocate_n_typed(INTERP,
+                        size, INTVAL);
+                mem_copy_n_typed(dest_int_array, int_array,
+                        size, INTVAL);
+                SET_ATTR_int_array(INTERP, dest, dest_int_array);
+            }
             SET_ATTR_size(INTERP, dest, size);
-            SET_ATTR_int_array(INTERP, dest, dest_int_array);
-
-            mem_sys_memcopy(dest_int_array, int_array, size * sizeof (INTVAL));
             PObj_custom_destroy_SET(dest);
         }
 


More information about the parrot-commits mailing list