[pypy-commit] cffi static-callback: Need an explicit cast here

arigo noreply at buildbot.pypy.org
Mon Nov 16 06:26:36 EST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: static-callback
Changeset: r2409:2f83b7a79e6c
Date: 2015-11-16 11:31 +0000
http://bitbucket.org/cffi/cffi/changeset/2f83b7a79e6c/

Log:	Need an explicit cast here

diff --git a/cffi/recompiler.py b/cffi/recompiler.py
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -371,7 +371,8 @@
         prnt('_cffi_pypyinit_%s(const void *p[])' % (base_module_name,))
         prnt('{')
         prnt('    if (((intptr_t)p[0]) >= 0x0A03) {')
-        prnt('        _cffi_call_python = p[1];')
+        prnt('        _cffi_call_python = (void(*)(struct _cffi_callpy_s *, '
+                                                  'char *))p[1];')
         prnt('    }')
         prnt('    p[0] = (const void *)%s;' % VERSION)
         prnt('    p[1] = &_cffi_type_context;')


More information about the pypy-commit mailing list