From b270b82f1137ff25ee263eafd31503d760f3403d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 May 2022 20:25:41 +0200 Subject: gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210) Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func). --- Python/clinic/marshal.c.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Python/clinic/marshal.c.h') diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index f80d5ef31f..36f2afd524 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -20,7 +20,7 @@ PyDoc_STRVAR(marshal_dump__doc__, "to the file. The object will not be properly read back by load()."); #define MARSHAL_DUMP_METHODDEF \ - {"dump", (PyCFunction)(void(*)(void))marshal_dump, METH_FASTCALL, marshal_dump__doc__}, + {"dump", _PyCFunction_CAST(marshal_dump), METH_FASTCALL, marshal_dump__doc__}, static PyObject * marshal_dump_impl(PyObject *module, PyObject *value, PyObject *file, @@ -87,7 +87,7 @@ PyDoc_STRVAR(marshal_dumps__doc__, "unsupported type."); #define MARSHAL_DUMPS_METHODDEF \ - {"dumps", (PyCFunction)(void(*)(void))marshal_dumps, METH_FASTCALL, marshal_dumps__doc__}, + {"dumps", _PyCFunction_CAST(marshal_dumps), METH_FASTCALL, marshal_dumps__doc__}, static PyObject * marshal_dumps_impl(PyObject *module, PyObject *value, int version); @@ -155,4 +155,4 @@ exit: return return_value; } -/*[clinic end generated code: output=68b78f38bfe0c06d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b9e838edee43fe87 input=a9049054013a1b77]*/ -- cgit v1.2.1