From 00a31178030c4a0371673b2e6c7dc33c1a89e45c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 2 Sep 2024 19:07:51 -0400 Subject: Bugfix --- compile.c | 2 +- types.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compile.c b/compile.c index 50e39fe8..b72b6c22 100644 --- a/compile.c +++ b/compile.c @@ -628,7 +628,7 @@ CORD compile_statement(env_t *env, ast_t *ast) case LangDef: { auto def = Match(ast, LangDef); CORD_appendf(&env->code->typeinfos, "public const TypeInfo %r%s = {%zu, %zu, {.tag=TextInfo, .TextInfo={%r}}};\n", - namespace_prefix(env->libname, env->namespace), def->name, sizeof(CORD), __alignof__(CORD), + namespace_prefix(env->libname, env->namespace), def->name, sizeof(Text_t), __alignof__(Text_t), CORD_quoted(def->name)); compile_namespace(env, def->name, def->namespace); return CORD_EMPTY; diff --git a/types.c b/types.c index cc35d792..16a77528 100644 --- a/types.c +++ b/types.c @@ -482,7 +482,7 @@ size_t type_size(type_t *t) } } case NumType: return Match(t, NumType)->bits == TYPE_NBITS64 ? sizeof(double) : sizeof(float); - case TextType: return sizeof(CORD); + case TextType: return sizeof(Text_t); case ArrayType: return sizeof(array_t); case SetType: return sizeof(table_t); case ChannelType: return sizeof(channel_t*); @@ -545,7 +545,7 @@ size_t type_align(type_t *t) } } case NumType: return Match(t, NumType)->bits == TYPE_NBITS64 ? __alignof__(double) : __alignof__(float); - case TextType: return __alignof__(CORD); + case TextType: return __alignof__(Text_t); case SetType: return __alignof__(table_t); case ArrayType: return __alignof__(array_t); case ChannelType: return __alignof__(channel_t*); -- cgit v1.2.3