summaryrefslogtreecommitdiffstats
path: root/Modules/syslogmodule.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/syslogmodule.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/syslogmodule.c')
-rw-r--r--Modules/syslogmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c
index 0f2fea1..2655a0c 100644
--- a/Modules/syslogmodule.c
+++ b/Modules/syslogmodule.c
@@ -252,7 +252,7 @@ syslog_log_upto(PyObject *self, PyObject *args)
/* List of functions defined in the module */
static PyMethodDef syslog_methods[] = {
- {"openlog", (PyCFunction)(void(*)(void)) syslog_openlog, METH_VARARGS | METH_KEYWORDS},
+ {"openlog", _PyCFunction_CAST(syslog_openlog), METH_VARARGS | METH_KEYWORDS},
{"closelog", syslog_closelog, METH_NOARGS},
{"syslog", syslog_syslog, METH_VARARGS},
{"setlogmask", syslog_setlogmask, METH_VARARGS},