diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-03 19:42:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 19:42:14 (GMT) |
commit | 804f2529d8e545a8d59eaf260ee032d014e681ba (patch) | |
tree | aab0f479960e57753df3789313363dd0e3e6bafc /Modules/_asynciomodule.c | |
parent | 551d02b3e697098236bb3a6e0a855b2ad8dc0424 (diff) | |
download | cpython-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/_asynciomodule.c')
-rw-r--r-- | Modules/_asynciomodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index d8d3da9..5fa7223 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -1724,7 +1724,7 @@ FutureIter_traverse(futureiterobject *it, visitproc visit, void *arg) static PyMethodDef FutureIter_methods[] = { {"send", (PyCFunction)FutureIter_send, METH_O, NULL}, - {"throw", (PyCFunction)(void(*)(void))FutureIter_throw, METH_FASTCALL, NULL}, + {"throw", _PyCFunction_CAST(FutureIter_throw), METH_FASTCALL, NULL}, {"close", (PyCFunction)FutureIter_close, METH_NOARGS, NULL}, {NULL, NULL} /* Sentinel */ }; |