mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00: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
Python/clinic/context.c.h
generated
6
Python/clinic/context.c.h
generated
|
@ -12,7 +12,7 @@ PyDoc_STRVAR(_contextvars_Context_get__doc__,
|
|||
"return None.");
|
||||
|
||||
#define _CONTEXTVARS_CONTEXT_GET_METHODDEF \
|
||||
{"get", (PyCFunction)(void(*)(void))_contextvars_Context_get, METH_FASTCALL, _contextvars_Context_get__doc__},
|
||||
{"get", _PyCFunction_CAST(_contextvars_Context_get), METH_FASTCALL, _contextvars_Context_get__doc__},
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_get_impl(PyContext *self, PyObject *key,
|
||||
|
@ -127,7 +127,7 @@ PyDoc_STRVAR(_contextvars_ContextVar_get__doc__,
|
|||
" * raise a LookupError.");
|
||||
|
||||
#define _CONTEXTVARS_CONTEXTVAR_GET_METHODDEF \
|
||||
{"get", (PyCFunction)(void(*)(void))_contextvars_ContextVar_get, METH_FASTCALL, _contextvars_ContextVar_get__doc__},
|
||||
{"get", _PyCFunction_CAST(_contextvars_ContextVar_get), METH_FASTCALL, _contextvars_ContextVar_get__doc__},
|
||||
|
||||
static PyObject *
|
||||
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value);
|
||||
|
@ -177,4 +177,4 @@ PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
|
|||
|
||||
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
|
||||
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
|
||||
/*[clinic end generated code: output=f2e42f34e358e179 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=2436b16a92452869 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue