[pypy-commit] pypy refactor-buffer-api: reorder
bdkearns
noreply at buildbot.pypy.org
Thu Apr 24 05:36:24 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: refactor-buffer-api
Changeset: r70915:53a0d2a1bfde
Date: 2014-04-23 22:19 -0400
http://bitbucket.org/pypy/pypy/changeset/53a0d2a1bfde/
Log: reorder
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1372,7 +1372,7 @@
BUF_WRITABLE = 4
def check_buf_flags(self, flags, readonly):
- if flags & self.BUF_WRITABLE == self.BUF_WRITABLE and readonly:
+ if readonly and flags & self.BUF_WRITABLE == self.BUF_WRITABLE:
raise oefmt(self.w_BufferError, "Object is not writable.")
def buffer_w(self, w_obj, flags):
More information about the pypy-commit
mailing list