Author: Manuel Jacob Branch: py3k-memoryview Changeset: r71618:34a46c3da6ce Date: 2014-05-20 04:05 +0200 http://bitbucket.org/pypy/pypy/changeset/34a46c3da6ce/
Log: Fix. 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 @@ -85,7 +85,8 @@ size = stop - start if size < 0: size = 0 - buf = SubBuffer(self.buf, start, size) + buf = SubBuffer(self.buf, start * self.buf.itemsize, + size * self.buf.itemsize) return W_MemoryView(buf) def descr_tobytes(self, space): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit