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/listobject.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/listobject.c.h')
-rw-r--r-- | Objects/clinic/listobject.c.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 75ed9f9..2499383 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -9,7 +9,7 @@ PyDoc_STRVAR(list_insert__doc__, "Insert object before index."); #define LIST_INSERT_METHODDEF \ - {"insert", (PyCFunction)(void(*)(void))list_insert, METH_FASTCALL, list_insert__doc__}, + {"insert", _PyCFunction_CAST(list_insert), METH_FASTCALL, list_insert__doc__}, static PyObject * list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object); @@ -106,7 +106,7 @@ PyDoc_STRVAR(list_pop__doc__, "Raises IndexError if list is empty or index is out of range."); #define LIST_POP_METHODDEF \ - {"pop", (PyCFunction)(void(*)(void))list_pop, METH_FASTCALL, list_pop__doc__}, + {"pop", _PyCFunction_CAST(list_pop), METH_FASTCALL, list_pop__doc__}, static PyObject * list_pop_impl(PyListObject *self, Py_ssize_t index); @@ -157,7 +157,7 @@ PyDoc_STRVAR(list_sort__doc__, "The reverse flag can be set to sort in descending order."); #define LIST_SORT_METHODDEF \ - {"sort", (PyCFunction)(void(*)(void))list_sort, METH_FASTCALL|METH_KEYWORDS, list_sort__doc__}, + {"sort", _PyCFunction_CAST(list_sort), METH_FASTCALL|METH_KEYWORDS, list_sort__doc__}, static PyObject * list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse); @@ -224,7 +224,7 @@ PyDoc_STRVAR(list_index__doc__, "Raises ValueError if the value is not present."); #define LIST_INDEX_METHODDEF \ - {"index", (PyCFunction)(void(*)(void))list_index, METH_FASTCALL, list_index__doc__}, + {"index", _PyCFunction_CAST(list_index), METH_FASTCALL, list_index__doc__}, static PyObject * list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start, @@ -353,4 +353,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=acb2f87736311930 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=eab97a76b1568a03 input=a9049054013a1b77]*/ |