aboutsummaryrefslogtreecommitdiff
path: root/src/structs.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-05-25 16:41:43 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-05-25 16:41:43 -0400
commitb2033f6d6d8918ed9ac72468aaa5faf96f8157dd (patch)
tree94d8697b8d664d716feeaa3831fa494c1eedcb6f /src/structs.c
parentf2f43f2e239890847c2f1833ad2e7baf07108145 (diff)
Optimize codegen for enums: no longer bother with a struct wrapper, but
just use a C enum type instead. This will make it easier to use externally defined enums in the future.
Diffstat (limited to 'src/structs.c')
-rw-r--r--src/structs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/structs.c b/src/structs.c
index b398b871..88de7aac 100644
--- a/src/structs.c
+++ b/src/structs.c
@@ -69,7 +69,7 @@ CORD compile_struct_header(env_t *env, ast_t *ast)
CORD typeinfo_code = CORD_all("extern const TypeInfo_t ", typeinfo_name, ";\n");
CORD optional_code = CORD_EMPTY;
if (!def->opaque) {
- optional_code = CORD_all("DEFINE_OPTIONAL_TYPE(", compile_type(t), ", ", unpadded_size, ",",
+ optional_code = CORD_all("DEFINE_OPTIONAL_TYPE(", compile_type(t), ", ", unpadded_size, ", ",
namespace_name(env, env->namespace, CORD_all("$Optional", def->name, "$$type")), ");\n");
}
return CORD_all(struct_code, optional_code, typeinfo_code);