generated c_library compiles

This commit is contained in:
2024-12-15 10:08:28 -05:00
parent 7946954017
commit e9752cb906
13 changed files with 356 additions and 316 deletions

View File

@ -19,7 +19,7 @@ CodeBody gen_hashtable_base()
));
Code define_type = untyped_str(txt(
R"(#define HashTable(_type) struct _type
R"(#define HashTable(_type) struct gen_HashTable_##_type
)"
));

View File

@ -89,11 +89,11 @@ CodeBody gen_fixed_arenas()
result.append(arena_interface_2mb);
result.append(arena_interface_4mb);
register_preprocess_macros( args(
( PreprocessorMacro { txt("fixed_arena_allocator_info"), MT_Expression, MF_Functional }),
( PreprocessorMacro { txt("fixed_arena_init"), MT_Expression, MF_Functional }),
( PreprocessorMacro { txt("fixed_arena_free"), MT_Expression, MF_Functional }),
( PreprocessorMacro { txt("fixed_arena_size_remaining"), MT_Expression, MF_Functional })
register_macros( args(
( Macro { txt("fixed_arena_allocator_info"), MT_Expression, MF_Functional }),
( Macro { txt("fixed_arena_init"), MT_Expression, MF_Functional }),
( Macro { txt("fixed_arena_free"), MT_Expression, MF_Functional }),
( Macro { txt("fixed_arena_size_remaining"), MT_Expression, MF_Functional })
));
CodeDefine def = parse_define(txt("#define fixed_arena_allocator_info(fixed_arena) ( (AllocatorInfo) { arena_allocator_proc, & (fixed_arena)->arena } )\n"));