[pypy-svn] pypy fast-forward: Fix a test in module/mmap

amauryfa commits-noreply at bitbucket.org
Mon Jan 10 14:40:06 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40552:e418f4196a3e
Date: 2011-01-10 13:09 +0100
http://bitbucket.org/pypy/pypy/changeset/e418f4196a3e/

Log:	Fix a test in module/mmap

diff --git a/pypy/interpreter/buffer.py b/pypy/interpreter/buffer.py
--- a/pypy/interpreter/buffer.py
+++ b/pypy/interpreter/buffer.py
@@ -250,8 +250,11 @@
         char = s[0]   # annotator hint
         return char
 
-    def getslice(self, start, stop):
+    def getslice(self, start, stop, step, size):
         space = self.space
+        if step != 1:
+            raise OperationError(space.w_ValueError, space.wrap(
+                "buffer object does not support slicing with a step"))
         s = space.str_w(space.getslice(self.w_obj, space.wrap(start),
                                                    space.wrap(stop)))
         return s


More information about the Pypy-commit mailing list