Skip to content

Commit 01a810c

Browse files
committed
Remove TDL_ workarounds
Also removes unnecessary SDL main stub Public API is unchanged, this is internal cleanup
1 parent 616d84c commit 01a810c

File tree

4 files changed

+5
-258
lines changed

4 files changed

+5
-258
lines changed

tcod/cffi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
#include "path.h"
1010
#include "random.h"
1111
#include "tcod.h"
12-
#include "tdl.h"

tcod/libtcodpy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3584,8 +3584,11 @@ def _unpack_union(type_: int, union: Any) -> Any: # noqa: PLR0911
35843584
raise RuntimeError(msg)
35853585

35863586

3587-
def _convert_TCODList(c_list: Any, type_: int) -> Any:
3588-
return [_unpack_union(type_, lib.TDL_list_get_union(c_list, i)) for i in range(lib.TCOD_list_size(c_list))]
3587+
def _convert_TCODList(c_list: Any, type_: int) -> Any: # noqa: N802
3588+
with ffi.new("TCOD_value_t[]", lib.TCOD_list_size(c_list)) as unions:
3589+
for i, union in enumerate(unions):
3590+
union.custom = lib.TCOD_list_get(c_list, i)
3591+
return [_unpack_union(type_, union) for union in unions]
35893592

35903593

35913594
@deprecate("Parser functions have been deprecated.")

tcod/tdl.c

Lines changed: 0 additions & 201 deletions
This file was deleted.

tcod/tdl.h

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)