fixes for generated c11 segemented

This commit is contained in:
Edward R. Gonzalez 2025-02-04 16:17:29 -05:00
parent 6481313969
commit 372cda734e
2 changed files with 16 additions and 9 deletions

View File

@ -484,7 +484,7 @@ void class_add_interface( CodeClass self, CodeTypename type )
possible_slot = cast(CodeTypename, possible_slot->Next);
}
possible_slot->Next = type;
possible_slot->Next = cast(Code, type);
}
#pragma endregion CodeClass
@ -700,10 +700,10 @@ void struct_add_interface(CodeStruct self, CodeTypename type )
while ( possible_slot->Next != nullptr )
{
possible_slot->Next = cast(CodeTypename, possible_slot->Next);
possible_slot = cast(CodeTypename, possible_slot->Next);
}
possible_slot->Next = type;
possible_slot->Next = cast(Code, type);
}
#pragma endregion Code

View File

@ -1882,6 +1882,9 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( r_header_macros );
header.print( header_generic_macros );
header.print_fmt( "\nGEN_API_C_BEGIN\n" );
header.print( r_header_basic_types );
header.print( r_header_debug );
header.print( rf_header_memory );
@ -1895,6 +1898,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( r_header_timing );
header.print(rf_header_parsing );
header.print_fmt( "\nGEN_API_C_END\n" );
header.print_fmt( "\nGEN_NS_END\n" );
header.write();
}
@ -1949,6 +1953,15 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( rf_ast_types );
header.print_fmt("\n#pragma endregion AST\n");
header.print( fmt_newline);
header.print( rf_array_arena );
header.print( fmt_newline);
header.print( rf_array_pool);
header.print( fmt_newline);
header.print( rf_array_string_cached );
header.print( fmt_newline);
header.print( rf_ht_preprocessor_macro );
header.print( rf_interface );
header.print( rf_constants );
header.print(fmt_newline);
@ -1958,7 +1971,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print_fmt("#pragma endregion Inlines\n");
header.print(fmt_newline);
header.print( rf_array_string_cached );
header.print( rf_header_builder );
header.print( rf_header_scanner );
@ -1976,11 +1988,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
builder_print( src, src_start );
src.print_fmt( "\nGEN_NS_BEGIN\n");
src.print( fmt_newline);
src.print( rf_array_arena );
src.print( fmt_newline);
src.print( rf_array_pool);
src.print( r_src_static_data );
src.print( fmt_newline);