Author: Antonio Cuni <[email protected]>
Branch: hpy-ctypespace
Changeset: r98141:3915c72fffc4
Date: 2019-11-22 15:13 +0100
http://bitbucket.org/pypy/pypy/changeset/3915c72fffc4/

Log:    use the new rffi.constcharp2str to match the lltype of these fields

diff --git a/pypy/module/hpy_universal/interp_extfunc.py 
b/pypy/module/hpy_universal/interp_extfunc.py
--- a/pypy/module/hpy_universal/interp_extfunc.py
+++ b/pypy/module/hpy_universal/interp_extfunc.py
@@ -14,7 +14,7 @@
     def __init__(self, ml, w_self):
         self.ml = ml
         self.w_self = w_self
-        self.name = rffi.charp2str(self.ml.c_ml_name)
+        self.name = rffi.constcharp2str(self.ml.c_ml_name)
         self.flags = rffi.cast(lltype.Signed, self.ml.c_ml_flags)
         # fetch the real HPy function pointer, by calling ml_meth, which
         # is a function that returns it and also the CPython-only trampoline
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
@@ -32,7 +32,7 @@
 
 @apifunc([llapi.HPyContext, lltype.Ptr(llapi.HPyModuleDef)], llapi.HPy)
 def HPyModule_Create(space, ctx, hpydef):
-    modname = rffi.charp2str(hpydef.c_m_name)
+    modname = rffi.constcharp2str(hpydef.c_m_name)
     w_mod = Module(space, space.newtext(modname))
     #
     # add all the functions defined in hpydef.c_m_methods
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to