cast between incompatible function types in _embedding.h
error: cast between incompatible function types from ‘PyObject * (*)(const void **)’ {aka ‘struct _object * (*)(const void **)’} to ‘void (*)(const void **)’ [-Werror=cast-function-type] (void(*)(const void *[]))_CFFI_PYTHON_STARTUP_FUNC,
Could the current code
/********** PyPy-specific section **********/
PyMODINIT_FUNC _CFFI_PYTHON_STARTUP_FUNC(const void *[]); /* forward */
static struct _cffi_pypy_init_s {
const char *name;
void (*func)(const void *[]);
const char *code;
} _cffi_pypy_init = {
_CFFI_MODULE_NAME,
(void(*)(const void *[]))_CFFI_PYTHON_STARTUP_FUNC,
_CFFI_PYTHON_STARTUP_CODE,
};
be changed to the following to avoid the error?
/********** PyPy-specific section **********/
PyMODINIT_FUNC _CFFI_PYTHON_STARTUP_FUNC(const void *[]); /* forward */
static struct _cffi_pypy_init_s {
const char *name;
PyObject * (*func)(const void **);
const char *code;
} _cffi_pypy_init = {
_CFFI_MODULE_NAME,
_CFFI_PYTHON_STARTUP_FUNC,
_CFFI_PYTHON_STARTUP_CODE,
};