[pypy-commit] pypy hpy-ctypespace: merge from hpy
antocuni
pypy.commits at gmail.com
Thu Nov 21 13:25:01 EST 2019
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: hpy-ctypespace
Changeset: r98136:f88d90878e29
Date: 2019-11-21 19:24 +0100
http://bitbucket.org/pypy/pypy/changeset/f88d90878e29/
Log: merge from hpy
diff --git a/pypy/module/hpy_universal/llapi.py b/pypy/module/hpy_universal/llapi.py
--- a/pypy/module/hpy_universal/llapi.py
+++ b/pypy/module/hpy_universal/llapi.py
@@ -126,8 +126,6 @@
# NOTE: this is not the real signature (we don't know what to put for
# va_list), but it's good enough to get the address of the function to store
-# in the ctx. DO NOT CALL THIS!. TO avoid possible mistakes, we directly cast
-# it to VOIDP
-ctx_Arg_Parse_fn = rffi.llexternal('ctx_Arg_Parse', [], rffi.INT_real,
- compilation_info=eci, _nowrapper=True)
-ctx_Arg_Parse = rffi.cast(rffi.VOIDP, ctx_Arg_Parse_fn)
+# in the ctx. DO NOT CALL THIS!
+DONT_CALL_ctx_Arg_Parse = rffi.llexternal('ctx_Arg_Parse', [], rffi.INT_real,
+ compilation_info=eci, _nowrapper=True)
diff --git a/pypy/module/hpy_universal/state.py b/pypy/module/hpy_universal/state.py
--- a/pypy/module/hpy_universal/state.py
+++ b/pypy/module/hpy_universal/state.py
@@ -77,5 +77,4 @@
funcptr = interp_hpy.HPyErr_SetString.get_llhelper(space)
self.ctx.c_ctx_Err_SetString = rffi.cast(rffi.VOIDP, funcptr)
#
- # the cast is not strictly necessary but silences a gcc warning
- self.ctx.c_ctx_Arg_Parse = rffi.cast(rffi.VOIDP, llapi.ctx_Arg_Parse)
+ self.ctx.c_ctx_Arg_Parse = rffi.cast(rffi.VOIDP, llapi.DONT_CALL_ctx_Arg_Parse)
More information about the pypy-commit
mailing list