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). --- Objects/clinic/codeobject.c.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Objects/clinic/codeobject.c.h') diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index 41c5c2e1170..df82524a86a 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -168,7 +168,7 @@ PyDoc_STRVAR(code_replace__doc__, "Return a copy of the code object with new values for the specified fields."); #define CODE_REPLACE_METHODDEF \ - {"replace", (PyCFunction)(void(*)(void))code_replace, METH_FASTCALL|METH_KEYWORDS, code_replace__doc__}, + {"replace", _PyCFunction_CAST(code_replace), METH_FASTCALL|METH_KEYWORDS, code_replace__doc__}, static PyObject * code_replace_impl(PyCodeObject *self, int co_argcount, @@ -409,7 +409,7 @@ PyDoc_STRVAR(code__varname_from_oparg__doc__, "WARNING: this method is for internal use only and may change or go away."); #define CODE__VARNAME_FROM_OPARG_METHODDEF \ - {"_varname_from_oparg", (PyCFunction)(void(*)(void))code__varname_from_oparg, METH_FASTCALL|METH_KEYWORDS, code__varname_from_oparg__doc__}, + {"_varname_from_oparg", _PyCFunction_CAST(code__varname_from_oparg), METH_FASTCALL|METH_KEYWORDS, code__varname_from_oparg__doc__}, static PyObject * code__varname_from_oparg_impl(PyCodeObject *self, int oparg); @@ -436,4 +436,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=ebfeec29d2cff674 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9c521b6c79f90ff7 input=a9049054013a1b77]*/ -- cgit v1.2.3