mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)
Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
This commit is contained in:
parent
c278474df9
commit
b270b82f11
99 changed files with 978 additions and 975 deletions
6
Objects/clinic/codeobject.c.h
generated
6
Objects/clinic/codeobject.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue