summaryrefslogtreecommitdiffstats
path: root/Modules/_collectionsmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-03 19:42:14 (GMT)
committerGitHub <noreply@github.com>2022-05-03 19:42:14 (GMT)
commit804f2529d8e545a8d59eaf260ee032d014e681ba (patch)
treeaab0f479960e57753df3789313363dd0e3e6bafc /Modules/_collectionsmodule.c
parent551d02b3e697098236bb3a6e0a855b2ad8dc0424 (diff)
downloadcpython-804f2529d8e545a8d59eaf260ee032d014e681ba.zip
cpython-804f2529d8e545a8d59eaf260ee032d014e681ba.tar.gz
cpython-804f2529d8e545a8d59eaf260ee032d014e681ba.tar.bz2
gh-91320: Use _PyCFunction_CAST() (#92251)
Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func). Change generated by the command: sed -i -e \ 's!(PyCFunction)(void(\*)(void)) *\([A-Za-z0-9_]\+\)!_PyCFunction_CAST(\1)!g' \ $(find -name "*.c")
Diffstat (limited to 'Modules/_collectionsmodule.c')
-rw-r--r--Modules/_collectionsmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 18c762b..741cfbe 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -1588,9 +1588,9 @@ static PyMethodDef deque_methods[] = {
METH_O, extend_doc},
{"extendleft", (PyCFunction)deque_extendleft,
METH_O, extendleft_doc},
- {"index", (PyCFunction)(void(*)(void))deque_index,
+ {"index", _PyCFunction_CAST(deque_index),
METH_FASTCALL, index_doc},
- {"insert", (PyCFunction)(void(*)(void))deque_insert,
+ {"insert", _PyCFunction_CAST(deque_insert),
METH_FASTCALL, insert_doc},
{"pop", (PyCFunction)deque_pop,
METH_NOARGS, pop_doc},
@@ -1604,7 +1604,7 @@ static PyMethodDef deque_methods[] = {
METH_NOARGS, reversed_doc},
{"reverse", (PyCFunction)deque_reverse,
METH_NOARGS, reverse_doc},
- {"rotate", (PyCFunction)(void(*)(void))deque_rotate,
+ {"rotate", _PyCFunction_CAST(deque_rotate),
METH_FASTCALL, rotate_doc},
{"__sizeof__", (PyCFunction)deque_sizeof,
METH_NOARGS, sizeof_doc},