bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS in Argument Clinic generated code.
diff --git a/Modules/clinic/_tkinter.c.h b/Modules/clinic/_tkinter.c.h
index a9dd739..a09bc2d 100644
--- a/Modules/clinic/_tkinter.c.h
+++ b/Modules/clinic/_tkinter.c.h
@@ -256,7 +256,7 @@
"\n");
#define _TKINTER_TKAPP_CREATECOMMAND_METHODDEF \
- {"createcommand", (PyCFunction)_tkinter_tkapp_createcommand, METH_FASTCALL, _tkinter_tkapp_createcommand__doc__},
+ {"createcommand", (PyCFunction)(void(*)(void))_tkinter_tkapp_createcommand, METH_FASTCALL, _tkinter_tkapp_createcommand__doc__},
static PyObject *
_tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
@@ -313,7 +313,7 @@
"\n");
#define _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF \
- {"createfilehandler", (PyCFunction)_tkinter_tkapp_createfilehandler, METH_FASTCALL, _tkinter_tkapp_createfilehandler__doc__},
+ {"createfilehandler", (PyCFunction)(void(*)(void))_tkinter_tkapp_createfilehandler, METH_FASTCALL, _tkinter_tkapp_createfilehandler__doc__},
static PyObject *
_tkinter_tkapp_createfilehandler_impl(TkappObject *self, PyObject *file,
@@ -374,7 +374,7 @@
"\n");
#define _TKINTER_TKAPP_CREATETIMERHANDLER_METHODDEF \
- {"createtimerhandler", (PyCFunction)_tkinter_tkapp_createtimerhandler, METH_FASTCALL, _tkinter_tkapp_createtimerhandler__doc__},
+ {"createtimerhandler", (PyCFunction)(void(*)(void))_tkinter_tkapp_createtimerhandler, METH_FASTCALL, _tkinter_tkapp_createtimerhandler__doc__},
static PyObject *
_tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
@@ -403,7 +403,7 @@
"\n");
#define _TKINTER_TKAPP_MAINLOOP_METHODDEF \
- {"mainloop", (PyCFunction)_tkinter_tkapp_mainloop, METH_FASTCALL, _tkinter_tkapp_mainloop__doc__},
+ {"mainloop", (PyCFunction)(void(*)(void))_tkinter_tkapp_mainloop, METH_FASTCALL, _tkinter_tkapp_mainloop__doc__},
static PyObject *
_tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold);
@@ -430,7 +430,7 @@
"\n");
#define _TKINTER_TKAPP_DOONEEVENT_METHODDEF \
- {"dooneevent", (PyCFunction)_tkinter_tkapp_dooneevent, METH_FASTCALL, _tkinter_tkapp_dooneevent__doc__},
+ {"dooneevent", (PyCFunction)(void(*)(void))_tkinter_tkapp_dooneevent, METH_FASTCALL, _tkinter_tkapp_dooneevent__doc__},
static PyObject *
_tkinter_tkapp_dooneevent_impl(TkappObject *self, int flags);
@@ -543,7 +543,7 @@
" if not None, then pass -use to wish");
#define _TKINTER_CREATE_METHODDEF \
- {"create", (PyCFunction)_tkinter_create, METH_FASTCALL, _tkinter_create__doc__},
+ {"create", (PyCFunction)(void(*)(void))_tkinter_create, METH_FASTCALL, _tkinter_create__doc__},
static PyObject *
_tkinter_create_impl(PyObject *module, const char *screenName,
@@ -638,4 +638,4 @@
#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
-/*[clinic end generated code: output=eb3202e07db3dbb1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a9d45a90cde94980 input=a9049054013a1b77]*/