Permalink
Browse files

clean FIA.clone

git-svn-id: https://svn.parrot.org/parrot/trunk@45992 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 3b6ebda commit 42f27d4d8b84a86cc9f5a601a917035d19337989 @NotFound NotFound committed Apr 24, 2010
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/pmc/fixedintegerarray.pmc
@@ -110,16 +110,16 @@ Creates and returns a copy of the array.
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);
}

0 comments on commit 42f27d4

Please sign in to comment.