Commit f9a6085b authored by Stefan Behnel's avatar Stefan Behnel

Fix several internal function signatures and function pointer casts that lead to warnings in gcc-8.

parent 09ac77a0
...@@ -340,7 +340,7 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void * ...@@ -340,7 +340,7 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *
} }
static int static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
PyObject* tmp; PyObject* tmp;
if (!value || value == Py_None) { if (!value || value == Py_None) {
value = NULL; value = NULL;
......
...@@ -1575,11 +1575,11 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje ...@@ -1575,11 +1575,11 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje
(likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) : \ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) : \
(PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ? \ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ? \
(PY_VERSION_HEX >= 0x030700A0 ? \ (PY_VERSION_HEX >= 0x030700A0 ? \
(*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &$empty_tuple, 0) : \ (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0) : \
(*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &$empty_tuple, 0, NULL)) : \ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL)) : \
(PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ? \ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ? \
(*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &$empty_tuple, 0, NULL) : \ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL) : \
(likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, $empty_tuple, NULL)) : \ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, $empty_tuple, NULL)) : \
((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, $empty_tuple) : \ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, $empty_tuple) : \
__Pyx__CallUnboundCMethod0(cfunc, self)))))) : \ __Pyx__CallUnboundCMethod0(cfunc, self)))))) : \
__Pyx__CallUnboundCMethod0(cfunc, self)) __Pyx__CallUnboundCMethod0(cfunc, self))
...@@ -1633,12 +1633,12 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* ...@@ -1633,12 +1633,12 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction*
return (*(cfunc->func))(self, arg); return (*(cfunc->func))(self, arg);
} else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
if (PY_VERSION_HEX >= 0x030700A0) { if (PY_VERSION_HEX >= 0x030700A0) {
return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1); return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
} else { } else {
return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
} }
} else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
} }
} }
return __Pyx__CallUnboundCMethod1(cfunc, self, arg); return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
...@@ -1655,7 +1655,7 @@ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObje ...@@ -1655,7 +1655,7 @@ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObje
Py_INCREF(arg); Py_INCREF(arg);
PyTuple_SET_ITEM(args, 0, arg); PyTuple_SET_ITEM(args, 0, arg);
if (cfunc->flag & METH_KEYWORDS) if (cfunc->flag & METH_KEYWORDS)
result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
else else
result = (*cfunc->func)(self, args); result = (*cfunc->func)(self, args);
} else { } else {
...@@ -1698,14 +1698,14 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * ...@@ -1698,14 +1698,14 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *
PyObject *args[2] = {arg1, arg2}; PyObject *args[2] = {arg1, arg2};
if (cfunc->flag == METH_FASTCALL) { if (cfunc->flag == METH_FASTCALL) {
#if PY_VERSION_HEX >= 0x030700A0 #if PY_VERSION_HEX >= 0x030700A0
return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, args, 2); return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
#else #else
return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
#endif #endif
} }
#if PY_VERSION_HEX >= 0x030700A0 #if PY_VERSION_HEX >= 0x030700A0
if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
#endif #endif
} }
return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
...@@ -1724,7 +1724,7 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje ...@@ -1724,7 +1724,7 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje
Py_INCREF(arg2); Py_INCREF(arg2);
PyTuple_SET_ITEM(args, 1, arg2); PyTuple_SET_ITEM(args, 1, arg2);
if (cfunc->flag & METH_KEYWORDS) if (cfunc->flag & METH_KEYWORDS)
result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
else else
result = (*cfunc->func)(self, args); result = (*cfunc->func)(self, args);
} else { } else {
...@@ -2121,9 +2121,9 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P ...@@ -2121,9 +2121,9 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P
assert(!PyErr_Occurred()); assert(!PyErr_Occurred());
if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
} else { } else {
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
} }
} }
#endif /* CYTHON_FAST_PYCCALL */ #endif /* CYTHON_FAST_PYCCALL */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment