[pypy-commit] pypy memoryview-attributes: space.newbool(...) rather than use space.wrap. tests require a bool is returned

plan_rich pypy.commits at gmail.com
Mon Aug 22 07:22:44 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: memoryview-attributes
Changeset: r86416:ac02a70c592b
Date: 2016-08-22 13:22 +0200
http://bitbucket.org/pypy/pypy/changeset/ac02a70c592b/

Log:	space.newbool(...) rather than use space.wrap. tests require a bool
	is returned

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
@@ -127,7 +127,7 @@
         return space.wrap(self.buf.getndim())
 
     def w_is_readonly(self, space):
-        return space.wrap(self.buf.readonly)
+        return space.newbool(self.buf.readonly)
 
     def w_get_shape(self, space):
         return space.newtuple([space.wrap(x) for x in self.buf.getshape()])


More information about the pypy-commit mailing list