Author: Antonio Cuni <[email protected]>
Branch: hpy
Changeset: r98172:961b3a276537
Date: 2019-11-28 12:16 +0100
http://bitbucket.org/pypy/pypy/changeset/961b3a276537/
Log: fix translation for the part which was broken by 64a75c77d1cc.
Translation is still broken because of other problems though, will
be fixed later
diff --git a/pypy/module/hpy_universal/apiset.py
b/pypy/module/hpy_universal/apiset.py
--- a/pypy/module/hpy_universal/apiset.py
+++ b/pypy/module/hpy_universal/apiset.py
@@ -1,6 +1,7 @@
import re
from rpython.rtyper.annlowlevel import llhelper
from rpython.rtyper.lltypesystem import lltype
+from rpython.rlib.unroll import unrolling_iterable
from rpython.rlib.objectmodel import specialize, llhelper_can_raise
@@ -11,6 +12,10 @@
def __init__(self):
self.all_functions = []
+ def _freeze_(self):
+ self.all_functions = unrolling_iterable(self.all_functions)
+ return True
+
def func(self, argtypes, restype):
def decorate(fn):
# attach various helpers to fn, so you can access things like
diff --git a/pypy/module/hpy_universal/interp_hpy.py
b/pypy/module/hpy_universal/interp_hpy.py
--- a/pypy/module/hpy_universal/interp_hpy.py
+++ b/pypy/module/hpy_universal/interp_hpy.py
@@ -26,7 +26,7 @@
if not 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.charp2str(p[i].c_ml_name))
+ rffi.constcharp2str(p[i].c_ml_name))
w_extfunc = interp_extfunc.W_ExtensionFunction(p[i], w_mod)
space.setattr(w_mod, space.newtext(w_extfunc.name), w_extfunc)
i += 1
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit