[pypy-commit] pypy py3k: bah, of course when we do a slice we need to wrap() the resulting memoryview, not wrapbytes() it. This makes test_basic passing

antocuni noreply at buildbot.pypy.org
Wed Mar 21 11:24:31 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53854:904bd04ac5b7
Date: 2012-03-21 11:22 +0100
http://bitbucket.org/pypy/pypy/changeset/904bd04ac5b7/

Log:	bah, of course when we do a slice we need to wrap() the resulting
	memoryview, not wrapbytes() it. This makes test_basic passing

diff --git a/pypy/module/__builtin__/interp_memoryview.py b/pypy/module/__builtin__/interp_memoryview.py
--- a/pypy/module/__builtin__/interp_memoryview.py
+++ b/pypy/module/__builtin__/interp_memoryview.py
@@ -84,7 +84,7 @@
             return space.wrapbytes(self.buf.getitem(start))
         elif step == 1:
             res = self.getslice(start, stop)
-            return space.wrapbytes(res)
+            return space.wrap(res)
         else:
             raise OperationError(space.w_ValueError,
                 space.wrap("memoryview object does not support"


More information about the pypy-commit mailing list