[pypy-commit] pypy py3k-memoryview: Fix.
Manuel Jacob
noreply at buildbot.pypy.org
Tue May 20 18:57:20 CEST 2014
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):
More information about the pypy-commit
mailing list