From 804f2529d8e545a8d59eaf260ee032d014e681ba Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 May 2022 21:42:14 +0200 Subject: 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") --- Modules/_lsprof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_lsprof.c') diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index ff499aacba..9ba45e69ef 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -787,7 +787,7 @@ profiler_init(ProfilerObject *pObj, PyObject *args, PyObject *kw) static PyMethodDef profiler_methods[] = { _LSPROF_PROFILER_GETSTATS_METHODDEF - {"enable", (PyCFunction)(void(*)(void))profiler_enable, + {"enable", _PyCFunction_CAST(profiler_enable), METH_VARARGS | METH_KEYWORDS, enable_doc}, {"disable", (PyCFunction)profiler_disable, METH_NOARGS, disable_doc}, -- cgit v1.2.1