[pypy-commit] pypy hpy: translation fix

antocuni pypy.commits at gmail.com
Mon Dec 2 06:25:01 EST 2019


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: hpy
Changeset: r98210:e716d29bf67d
Date: 2019-12-01 11:54 +0100
http://bitbucket.org/pypy/pypy/changeset/e716d29bf67d/

Log:	translation fix

diff --git a/pypy/module/hpy_universal/interp_module.py b/pypy/module/hpy_universal/interp_module.py
--- a/pypy/module/hpy_universal/interp_module.py
+++ b/pypy/module/hpy_universal/interp_module.py
@@ -1,4 +1,5 @@
 from rpython.rtyper.lltypesystem import lltype, rffi
+from rpython.rlib.rarithmetic import widen
 from pypy.interpreter.error import OperationError, oefmt
 from pypy.interpreter.module import Module
 from pypy.module.hpy_universal.apiset import API
@@ -17,7 +18,7 @@
         p = hpydef.c_m_methods
         i = 0
         while p[i].c_ml_name:
-            if not p[i].c_ml_flags & llapi._HPy_METH:
+            if not widen(p[i].c_ml_flags) & llapi._HPy_METH:
                 # we need to add support for legacy methods through cpyext
                 raise oefmt(space.w_NotImplementedError, "non-hpy method: %s",
                             rffi.constcharp2str(p[i].c_ml_name))


More information about the pypy-commit mailing list