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/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h
index ac3ff0c..8ff2a2b 100644
--- a/Objects/clinic/floatobject.c.h
+++ b/Objects/clinic/floatobject.c.h
@@ -47,7 +47,7 @@
"When an argument is passed, work like built-in round(x, ndigits).");
#define FLOAT___ROUND___METHODDEF \
- {"__round__", (PyCFunction)float___round__, METH_FASTCALL, float___round____doc__},
+ {"__round__", (PyCFunction)(void(*)(void))float___round__, METH_FASTCALL, float___round____doc__},
static PyObject *
float___round___impl(PyObject *self, PyObject *o_ndigits);
@@ -256,7 +256,7 @@
"This affects how floats are converted to and from binary strings.");
#define FLOAT___SET_FORMAT___METHODDEF \
- {"__set_format__", (PyCFunction)float___set_format__, METH_FASTCALL|METH_CLASS, float___set_format____doc__},
+ {"__set_format__", (PyCFunction)(void(*)(void))float___set_format__, METH_FASTCALL|METH_CLASS, float___set_format____doc__},
static PyObject *
float___set_format___impl(PyTypeObject *type, const char *typestr,
@@ -305,4 +305,4 @@
exit:
return return_value;
}
-/*[clinic end generated code: output=a3c366a156be61f9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=091dd499f5386a6c input=a9049054013a1b77]*/