gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)

Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
This commit is contained in:
Victor Stinner 2022-05-03 20:25:41 +02:00 committed by GitHub
parent c278474df9
commit b270b82f11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 978 additions and 975 deletions

View file

@ -9,7 +9,7 @@ PyDoc_STRVAR(warnings_warn__doc__,
"Issue a warning, or maybe ignore it or raise an exception.");
#define WARNINGS_WARN_METHODDEF \
{"warn", (PyCFunction)(void(*)(void))warnings_warn, METH_FASTCALL|METH_KEYWORDS, warnings_warn__doc__},
{"warn", _PyCFunction_CAST(warnings_warn), METH_FASTCALL|METH_KEYWORDS, warnings_warn__doc__},
static PyObject *
warnings_warn_impl(PyObject *module, PyObject *message, PyObject *category,
@ -66,4 +66,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=eb9997fa998fdbad input=a9049054013a1b77]*/
/*[clinic end generated code: output=0435c68611fa2fe9 input=a9049054013a1b77]*/