[pypy-commit] pypy py3.5-memoryview: translation fixes

plan_rich pypy.commits at gmail.com
Tue Aug 30 14:49:00 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5-memoryview
Changeset: r86753:8a93b321520c
Date: 2016-08-30 20:38 +0200
http://bitbucket.org/pypy/pypy/changeset/8a93b321520c/

Log:	translation fixes

diff --git a/pypy/objspace/std/memoryobject.py b/pypy/objspace/std/memoryobject.py
--- a/pypy/objspace/std/memoryobject.py
+++ b/pypy/objspace/std/memoryobject.py
@@ -121,11 +121,13 @@
     def _copy_rec(self, idim, data, off):
         shapes = self.getshape()
         shape = shapes[idim]
+        strides = self.getstrides()
 
         if self.getndim()-1 == idim:
             self._copy_base(data,off)
             return
 
+        # TODO add a test that has at least 2 dims
         for i in range(shape):
             self._copy_rec(idim+1,data,off)
             off += strides[idim]


More information about the pypy-commit mailing list