[pypy-commit] pypy default: Backed out changeset 5d2970523f79, this breaks translation.

alex_gaynor noreply at buildbot.pypy.org
Fri Jul 8 03:23:11 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r45412:3476b9be3cec
Date: 2011-07-07 18:31 -0700
http://bitbucket.org/pypy/pypy/changeset/3476b9be3cec/

Log:	Backed out changeset 5d2970523f79, this breaks translation.

diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -11,11 +11,12 @@
 from pypy.objspace.std.stdtypedef import SMM, StdTypeDef
 from pypy.objspace.std.register_all import register_all
 from pypy.rlib.rarithmetic import ovfcheck
-from pypy.rlib.rgc import ll_arraycopy
 from pypy.rlib.unroll import unrolling_iterable
 from pypy.rpython.lltypesystem import lltype, rffi
 
 
+memcpy = rffi.llexternal("memcpy", [rffi.VOIDP, rffi.VOIDP, rffi.SIZE_T], lltype.Void)
+
 @unwrap_spec(typecode=str)
 def w_array(space, w_cls, typecode, __args__):
     if len(__args__.arguments_w) > 1:
@@ -620,12 +621,10 @@
     def array_copy__Array(space, self):
         w_a = mytype.w_class(self.space)
         w_a.setlen(self.len)
-        ll_arraycopy(
-            self.buffer,
-            w_a.buffer,
-            0,
-            0,
-            self.len,
+        memcpy(
+            rffi.cast(rffi.VOIDP, w_a.buffer),
+            rffi.cast(rffi.VOIDP, self.buffer),
+            self.len * mytype.bytes
         )
         return w_a
 


More information about the pypy-commit mailing list