diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-03 18:25:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 18:25:41 (GMT) |
commit | b270b82f1137ff25ee263eafd31503d760f3403d (patch) | |
tree | 09a2ae5d93d47aa51f831f9fc906215095172667 /Modules/clinic/gcmodule.c.h | |
parent | c278474df97de310535425c207136bf26c663e0b (diff) | |
download | cpython-b270b82f1137ff25ee263eafd31503d760f3403d.zip cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.gz cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.bz2 |
gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
Diffstat (limited to 'Modules/clinic/gcmodule.c.h')
-rw-r--r-- | Modules/clinic/gcmodule.c.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index 30efc7e..5391b8b 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -79,7 +79,7 @@ PyDoc_STRVAR(gc_collect__doc__, "The number of unreachable objects is returned."); #define GC_COLLECT_METHODDEF \ - {"collect", (PyCFunction)(void(*)(void))gc_collect, METH_FASTCALL|METH_KEYWORDS, gc_collect__doc__}, + {"collect", _PyCFunction_CAST(gc_collect), METH_FASTCALL|METH_KEYWORDS, gc_collect__doc__}, static Py_ssize_t gc_collect_impl(PyObject *module, int generation); @@ -233,7 +233,7 @@ PyDoc_STRVAR(gc_get_objects__doc__, "that are in that generation."); #define GC_GET_OBJECTS_METHODDEF \ - {"get_objects", (PyCFunction)(void(*)(void))gc_get_objects, METH_FASTCALL|METH_KEYWORDS, gc_get_objects__doc__}, + {"get_objects", _PyCFunction_CAST(gc_get_objects), METH_FASTCALL|METH_KEYWORDS, gc_get_objects__doc__}, static PyObject * gc_get_objects_impl(PyObject *module, Py_ssize_t generation); @@ -372,4 +372,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=61e15f3a549f3ab5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=71f7136d6e3f2323 input=a9049054013a1b77]*/ |