[pypy-commit] pypy buffer-interface2: fix redundant condition, fixes first part of issue #2411 (arigato)
mattip
pypy.commits at gmail.com
Fri Oct 7 09:30:47 EDT 2016
Author: Matti Picus <matti.picus at gmail.com>
Branch: buffer-interface2
Changeset: r87617:81cfdc497c7d
Date: 2016-10-07 16:29 +0300
http://bitbucket.org/pypy/pypy/changeset/81cfdc497c7d/
Log: fix redundant condition, fixes first part of issue #2411 (arigato)
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -209,10 +209,7 @@
w_impl = space.lookup(self, '__buffer__')
if w_impl is None:
# cpyext types that may have only old buffer interface
- if flags & space.BUF_WRITABLE:
- w_impl = space.lookup(self, '__wbuffer__')
- else:
- w_impl = space.lookup(self, '__wbuffer__')
+ w_impl = space.lookup(self, '__wbuffer__')
if w_impl is not None:
w_result = space.get_and_call_function(w_impl, self,
space.newint(flags))
More information about the pypy-commit
mailing list