Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.5 Changeset: r91711:79da8a0088eb Date: 2017-07-07 09:55 +0300 http://bitbucket.org/pypy/pypy/changeset/79da8a0088eb/
Log: fix translation diff --git a/pypy/module/cpyext/buffer.py b/pypy/module/cpyext/buffer.py --- a/pypy/module/cpyext/buffer.py +++ b/pypy/module/cpyext/buffer.py @@ -1,6 +1,7 @@ from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rlib import rgc # Force registration of gc.collect from rpython.rlib.buffer import RawBuffer +from rpython.rlib.rarithmetic import widen from pypy.interpreter.error import oefmt from pypy.interpreter.buffer import BufferView from pypy.module.cpyext.api import ( @@ -219,6 +220,7 @@ 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. """ + flags = widen(flags) if flags & PyBUF_WRITABLE and readonly: raise oefmt(space.w_ValueError, "Object is not writable") view.c_buf = buf _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit