Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pyodide_build/_f2c_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def scipy_fix_cfile(path: Path) -> None:
text = text.replace("void(*)", "int(*)")
text = text.replace("static void f2py_setup_", "static int f2py_setup_")

# Fix Cython-generated function pointer casts for __Pyx_IsSameCFunction
# for _matfuncs_sqrtm for builds of SciPy 1.16.0.
# TODO: I'm not sure if this is the best place to put this, but it works
text = re.sub(
r"(__Pyx_IsSameCFunction\([^,]+,\s*)\(int\(\*\)\(void\)\)",
r"\1(void(*)(void))",
text,
)

if path.name.endswith("_flapackmodule.c"):
text = text.replace(",size_t", "")
text = re.sub(r",slen\([a-z]*\)\)", ")", text)
Expand Down