MAINT: cast linear_sum_assignment to PyCFunction#16934
Conversation
linear_sum_assignment to PyCFunction
rgommers
left a comment
There was a problem hiding this comment.
LGTM, thanks @hoodmane
We have -Wno-incompatible-pointer-types set globally (in the top-level meson.build), and that turns off warnings for a superset of the issue you are running into here. https://clang.llvm.org/docs/DiagnosticsReference.html#wincompatible-pointer-types. GCC doesn't have incompatible-function-pointer-types separately, so we can't enable that easily globally. I'll see if I can clean up the non function pointer issues later.
|
The other issues seem to be in |
Well we have very extensive patching to fix these. But anything that touches fortran can't be easily upstreamed. |
|
Hmm, I thought that was just the |
|
Good point, I'm not sure. I think we have to fix both because we compile with |
|
Follow up to this in gh-16942 |
This updates scipy to v1.9.1. This was mercifully easy: * for now we disable meson * we dropped `patches/0014-BUG-Fix-signature-of-D_IIR_forback-1-2.patch` since it was upstreamed * we had to add a patch to put fitpack back into a shape that makes f2c happy * we need one more `-Wincompatible-function-pointer-types` fix upstream PR: scipy/scipy#16934
This updates scipy to v1.9.1. This was mercifully easy: * for now we disable meson * we dropped `patches/0014-BUG-Fix-signature-of-D_IIR_forback-1-2.patch` since it was upstreamed * we had to add a patch to put fitpack back into a shape that makes f2c happy * we need one more `-Wincompatible-function-pointer-types` fix upstream PR: scipy/scipy#16934
One more
-Wincompatible-function-pointer-typesfix.linear_sum_assignmenthas the correct signature forMETH_VARARGS | METH_KEYWORDS:PyCFunctionWithKeywordswhich isPyObject* (*f)(PyObject*,PyObject*,PyObject*). Theml_methentry inPyMethodDefmust have typePyCFunctionwhich isPyObject* (*f)(PyObject*,PyObject*). To prevent an error, we have to cast it explicitly.