gh-132097: use a macro for semantically casting function pointers (#132406)

This commit is contained in:
Bénédikt Tran 2025-04-18 12:24:34 +02:00 committed by GitHub
parent f3d877a27a
commit 379352620c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 47 additions and 31 deletions

View file

@ -567,7 +567,7 @@ cfunction_call(PyObject *func, PyObject *args, PyObject *kwargs)
PyObject *result;
if (flags & METH_KEYWORDS) {
result = _PyCFunctionWithKeywords_TrampolineCall(
(*(PyCFunctionWithKeywords)(void(*)(void))meth),
*_PyCFunctionWithKeywords_CAST(meth),
self, args, kwargs);
}
else {