Skip to content

Commit f24fb34

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Test Pyodide builds
1 parent 4215ffd commit f24fb34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build_sdl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,9 @@ def get_cdef() -> tuple[str, dict[str, str]]:
392392
for name in FLEXIBLE_STRUCTS:
393393
sdl_cdef = sdl_cdef.replace(f"}} {name};", f"...;}} {name};")
394394

395-
# Remove difficult functions
396-
sdl_cdef = "\n".join(line for line in sdl_cdef.splitlines() if "SDL_IOprintf" not in line)
395+
# Remove variable arg functions
396+
RE_VA_ARG_FUNC = re.compile(r"^.*?\([^()]*\.\.\.*\)\s*;\s*$", re.MULTILINE)
397+
sdl_cdef = RE_VA_ARG_FUNC.sub("", sdl_cdef)
397398

398399
return sdl_cdef + EXTRA_CDEF, parser.known_string_defines
399400

0 commit comments

Comments
 (0)