Skip to content

Commit 68b96dd

Browse files
committed
Remove SDL_IOprintf
1 parent dd62976 commit 68b96dd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎build_sdl.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ def python_machine() -> str:
143143
)
144144
)
145145

146+
# Causes issues on Pyodide builds
147+
BAN_ON_PYODIDE = [
148+
"SDL_IOprintf",
149+
]
150+
146151

147152
def check_sdl_version() -> None:
148153
"""Check the local SDL3 version on Linux distributions."""
@@ -390,6 +395,8 @@ def get_cdef() -> tuple[str, dict[str, str]]:
390395
)
391396
for name in FLEXIBLE_STRUCTS:
392397
sdl_cdef = sdl_cdef.replace(f"}} {name};", f"...;}} {name};")
398+
for symbol in BAN_ON_PYODIDE:
399+
sdl_cdef = re.sub(pattern=rf"^.*{symbol}.*;$", repl="", string=sdl_cdef, flags=re.MULTILINE)
393400
return sdl_cdef + EXTRA_CDEF, parser.known_string_defines
394401

395402

0 commit comments

Comments
 (0)