Fix codegen hidden bugs
This commit is contained in:
parent
9a651665ba
commit
25395553d7
7
Makefile
7
Makefile
@ -24,9 +24,9 @@ ifeq ($(CC),gcc)
|
||||
export ASAN_OPTIONS=verify_asan_link_order=0
|
||||
endif
|
||||
|
||||
.PHONY: all clean builddir build-test run-test build-lib full prng testing uuid core containers
|
||||
.PHONY: all clean builddir build-test run-test codegen build-lib full prng testing uuid core containers
|
||||
|
||||
all: clean builddir run-test full
|
||||
all: clean builddir codegen run-test full
|
||||
|
||||
clean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
@ -41,6 +41,9 @@ run-test: build-test
|
||||
@$(TEST_OUT)
|
||||
@rm $(TEST_OUT)
|
||||
|
||||
codegen:
|
||||
python3 -m codegen
|
||||
|
||||
build-lib:
|
||||
$(CC) $(CFLAGS) $(LIBFLAGS) $(LIB_SRC) -o $(LIB_OUT)
|
||||
|
||||
|
@ -69,7 +69,7 @@ def make_dbl_list(user_datatypes: dict[CDataType, DblListData] = {}):
|
||||
|
||||
header = CHeader(
|
||||
name="dbl_list",
|
||||
decl_types=common_decl_types,
|
||||
decl_types=[*common_decl_types],
|
||||
includes=[],
|
||||
types=[],
|
||||
funcs=[]
|
||||
@ -77,6 +77,7 @@ def make_dbl_list(user_datatypes: dict[CDataType, DblListData] = {}):
|
||||
|
||||
source = CSource(
|
||||
name=header.name,
|
||||
decl_types=[*common_decl_types],
|
||||
includes=[CInclude(header, local=True, same_dir=True), CInclude(header="stddef.h")],
|
||||
internal_funcs=[],
|
||||
funcs=header.funcs
|
||||
@ -90,7 +91,7 @@ def make_dbl_list(user_datatypes: dict[CDataType, DblListData] = {}):
|
||||
type_string = get_datatype_string(_type)
|
||||
|
||||
node = CStruct(
|
||||
name=f"{type_string.title()}Node",
|
||||
name=dbl_list_data.node_typename,
|
||||
cargs=[
|
||||
CArg(name="item", _type=type_string, pointer=CPointer(_type=CPointerType.SINGLE)),
|
||||
],
|
||||
@ -101,7 +102,7 @@ def make_dbl_list(user_datatypes: dict[CDataType, DblListData] = {}):
|
||||
])
|
||||
|
||||
dl_list = CStruct(
|
||||
name=f"{type_string.title()}List",
|
||||
name=dbl_list_data.list_typename,
|
||||
cargs=[
|
||||
CArg(name="first", _type=node, pointer=CPointer(_type=CPointerType.SINGLE)),
|
||||
CArg(name="last", _type=node, pointer=CPointer(_type=CPointerType.SINGLE)),
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include "../../common/aliases/aliases.h"
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct str8 Str8;
|
||||
|
||||
internal Str8List str8_node_to_list(Str8Node *node);
|
||||
|
||||
Str8Node *wapp_str8_list_get(const Str8List *list, u64 index) {
|
||||
|
Loading…
Reference in New Issue
Block a user