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/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h
index 1ae9332..0df4935 100644
--- a/Python/clinic/marshal.c.h
+++ b/Python/clinic/marshal.c.h
@@ -20,7 +20,7 @@
"to the file. The object will not be properly read back by load().");
#define MARSHAL_DUMP_METHODDEF \
- {"dump", (PyCFunction)marshal_dump, METH_FASTCALL, marshal_dump__doc__},
+ {"dump", (PyCFunction)(void(*)(void))marshal_dump, METH_FASTCALL, marshal_dump__doc__},
static PyObject *
marshal_dump_impl(PyObject *module, PyObject *value, PyObject *file,
@@ -78,7 +78,7 @@
"unsupported type.");
#define MARSHAL_DUMPS_METHODDEF \
- {"dumps", (PyCFunction)marshal_dumps, METH_FASTCALL, marshal_dumps__doc__},
+ {"dumps", (PyCFunction)(void(*)(void))marshal_dumps, METH_FASTCALL, marshal_dumps__doc__},
static PyObject *
marshal_dumps_impl(PyObject *module, PyObject *value, int version);
@@ -134,4 +134,4 @@
return return_value;
}
-/*[clinic end generated code: output=584eb2222d86fdc3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=cbb6128201bee7e0 input=a9049054013a1b77]*/