Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: py3.5
Changeset: r89503:73e4cf94fc54
Date: 2017-01-11 19:07 +0000
http://bitbucket.org/pypy/pypy/changeset/73e4cf94fc54/

Log:    fix translation

diff --git a/pypy/module/cpyext/object.py b/pypy/module/cpyext/object.py
--- a/pypy/module/cpyext/object.py
+++ b/pypy/module/cpyext/object.py
@@ -491,7 +491,8 @@
     share a contiguous chunk of memory of "unsigned bytes" of the given
     length. Returns 0 on success and -1 (with raising an error) on error.
     """
-    if rffi.cast(lltype.Signed, flags) & PyBUF_WRITABLE and readonly:
+    flags = rffi.cast(lltype.Signed, flags)
+    if flags & PyBUF_WRITABLE and readonly:
         raise oefmt(space.w_ValueError, "Object is not writable")
     view.c_buf = buf
     view.c_len = length
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to