summaryrefslogtreecommitdiffstats
path: root/Python/clinic/context.c.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-03 18:25:41 (GMT)
committerGitHub <noreply@github.com>2022-05-03 18:25:41 (GMT)
commitb270b82f1137ff25ee263eafd31503d760f3403d (patch)
tree09a2ae5d93d47aa51f831f9fc906215095172667 /Python/clinic/context.c.h
parentc278474df97de310535425c207136bf26c663e0b (diff)
downloadcpython-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 'Python/clinic/context.c.h')
-rw-r--r--Python/clinic/context.c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/clinic/context.c.h b/Python/clinic/context.c.h
index 2ac8bf7..292d3f7 100644
--- a/Python/clinic/context.c.h
+++ b/Python/clinic/context.c.h
@@ -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]*/