[pypy-commit] pypy memoryview-attributes: newbool requires a bool, not int
mattip
pypy.commits at gmail.com
Tue Aug 23 01:18:48 EDT 2016
Author: Matti Picus <matti.picus at gmail.com>
Branch: memoryview-attributes
Changeset: r86432:9a44d04048ef
Date: 2016-08-23 15:17 +1000
http://bitbucket.org/pypy/pypy/changeset/9a44d04048ef/
Log: newbool requires a bool, not int
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.newbool(self.buf.readonly)
+ return space.newbool(self.buf.readonly != 0)
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