aboutsummaryrefslogtreecommitdiff
path: root/src/compile/files.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-01 13:17:43 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-01 13:17:43 -0400
commitee020c72d92c3807fa4afcd1e170d3df81688b97 (patch)
tree60d0bd641db08bab082bbbb7f10f72d29995cdfe /src/compile/files.c
parentc0c6fe863f8e074cbe8297b5da2a476f455b6518 (diff)
Switch to using Texts(x) instead of Texts(String(x)) when possible
Diffstat (limited to 'src/compile/files.c')
-rw-r--r--src/compile/files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile/files.c b/src/compile/files.c
index 2b0ac4bf..a6af2300 100644
--- a/src/compile/files.c
+++ b/src/compile/files.c
@@ -103,7 +103,7 @@ static Text_t compile_top_level_code(env_t *env, ast_t *ast) {
"types, not ",
type_to_str(Match(type, FunctionType)->ret));
Text_t name_code =
- namespace_name(env, env->namespace, Texts(name, "$", String(get_line_number(ast->file, ast->start))));
+ namespace_name(env, env->namespace, Texts(name, "$", get_line_number(ast->file, ast->start)));
return compile_function(env, name_code, ast, &env->code->staticdefs);
}
case StructDef: {
@@ -125,7 +125,7 @@ static Text_t compile_top_level_code(env_t *env, ast_t *ast) {
DeclareMatch(def, ast, LangDef);
Text_t code =
Texts("public const TypeInfo_t ", namespace_name(env, env->namespace, Texts(def->name, "$$info")), " = {",
- String((int64_t)sizeof(Text_t)), ", ", String((int64_t)__alignof__(Text_t)),
+ (int64_t)sizeof(Text_t), ", ", (int64_t)__alignof__(Text_t),
", .metamethods=Text$metamethods, .tag=TextInfo, .TextInfo={", quoted_str(def->name), "}};\n");
env_t *ns_env = namespace_env(env, def->name);
return Texts(code, def->namespace ? compile_top_level_code(ns_env, def->namespace) : EMPTY_TEXT);