summaryrefslogtreecommitdiffstats
path: root/Modules/xxlimited.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/xxlimited.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/xxlimited.c')
-rw-r--r--Modules/xxlimited.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c
index c36bf5c..5177ecd 100644
--- a/Modules/xxlimited.c
+++ b/Modules/xxlimited.c
@@ -224,7 +224,7 @@ Xxo_demo(XxoObject *self, PyTypeObject *defining_class,
}
static PyMethodDef Xxo_methods[] = {
- {"demo", (PyCFunction)(void(*)(void))Xxo_demo,
+ {"demo", _PyCFunction_CAST(Xxo_demo),
METH_METHOD | METH_FASTCALL | METH_KEYWORDS, PyDoc_STR("demo(o) -> o")},
{NULL, NULL} /* sentinel */
};