Skip to content

Commit 287de68

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! squash! fixup! Fix CI regressions
1 parent 1d958b2 commit 287de68

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

build_libtcod.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ def walk_sources(directory: str) -> Iterator[str]:
211211

212212
ffi = FFI()
213213
sdl_cdef, sdl_strings = build_sdl.get_cdef()
214-
try:
215-
ffi.cdef(sdl_cdef)
216-
except Exception as exc:
217-
raise RuntimeError(f"Processed cdef is as follows:\n{sdl_cdef}") from exc # noqa: EM102, TRY003
214+
ffi.cdef(sdl_cdef)
218215
for include in includes:
219216
try:
220217
ffi.cdef(include.header)

build_sdl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def get_cdef() -> tuple[str, dict[str, str]]:
319319
320320
#define _SIZE_T_DEFINED_
321321
typedef int... size_t;
322-
typedef _Bool bool;
322+
#define bool _Bool
323323
324324
#define SDL_oldnames_h_
325325
@@ -328,6 +328,7 @@ def get_cdef() -> tuple[str, dict[str, str]]:
328328
)
329329
sdl_cdef = parser.get_output()
330330

331+
sdl_cdef = sdl_cdef.replace("_Bool", "bool")
331332
sdl_cdef = RE_VAFUNC.sub("", sdl_cdef)
332333
sdl_cdef = RE_INLINE.sub("", sdl_cdef)
333334
sdl_cdef = RE_PIXELFORMAT.sub(r"\g<name> = ...", sdl_cdef)

0 commit comments

Comments
 (0)