diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-03 18:25:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 18:25:41 (GMT) |
commit | b270b82f1137ff25ee263eafd31503d760f3403d (patch) | |
tree | 09a2ae5d93d47aa51f831f9fc906215095172667 /Objects/clinic/codeobject.c.h | |
parent | c278474df97de310535425c207136bf26c663e0b (diff) | |
download | cpython-b270b82f1137ff25ee263eafd31503d760f3403d.zip cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.gz cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.bz2 |
gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
Diffstat (limited to 'Objects/clinic/codeobject.c.h')
-rw-r--r-- | Objects/clinic/codeobject.c.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index 41c5c2e..df82524 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]*/ |