Cleanup/fixes

This commit is contained in:
Bruce Hill 2024-03-03 13:44:22 -05:00
parent 0256972ca6
commit bde2a0b338
2 changed files with 2 additions and 3 deletions

View File

@ -13,8 +13,7 @@
.data=memcpy(GC_MALLOC(sizeof($ents)), $ents, sizeof($ents)), \
.length=sizeof($ents)/sizeof($ents[0]), \
.stride=(void*)&$ents[1] - (void*)&$ents[0], \
}, &((TypeInfo){.size=sizeof(table_t), .align=__alignof__(table_t), .tag=TableInfo, \
.TableInfo.key=key_info, .TableInfo.value=value_info})); \
}, $TableInfo(key_info, value_info)); \
$table.fallback = fb; \
$table.default_value = def; \
$table; })

View File

@ -115,7 +115,7 @@ void compile_enum_def(env_t *env, ast_t *ast)
type_t *t = Table_str_get(env->types, def->name);
CORD typeinfo = CORD_asprintf("public const TypeInfo %s = {%zu, %zu, {.tag=CustomInfo, .CustomInfo={",
def->name, def->name, type_size(t), type_align(t));
def->name, type_size(t), type_align(t));
env->code->funcs = CORD_all(
env->code->funcs,