aboutsummaryrefslogtreecommitdiff
path: root/src/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-30 14:30:56 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-30 14:30:56 -0400
commit46818674d3588dd15ebca5cb7be4afa8cd485cfe (patch)
tree1494ed66d14cce185a4b4317b047bba3b1f5119c /src/compile.c
parent45f0051c50949744fd1a52313fbf48a944f49c10 (diff)
Use namespace prefix function when appropriate
Diffstat (limited to 'src/compile.c')
-rw-r--r--src/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile.c b/src/compile.c
index 93fe92cf..52c8a736 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -4485,7 +4485,7 @@ CORD compile_file(env_t *env, ast_t *ast)
env->code->lambdas, "\n",
env->code->staticdefs, "\n",
top_level_code,
- "public void _$", env->namespace->name, "$$initialize(void) {\n",
+ "public void ", namespace_prefix(env, env->namespace), "$initialize(void) {\n",
"static bool initialized = false;\n",
"if (initialized) return;\n",
"initialized = true;\n",
@@ -4721,7 +4721,7 @@ CORD compile_file_header(env_t *env, Path_t header_path, ast_t *ast)
visit_topologically(Match(ast, Block)->statements, (Closure_t){.fn=(void*)_make_typedefs, &info});
visit_topologically(Match(ast, Block)->statements, (Closure_t){.fn=(void*)_define_types_and_funcs, &info});
- header = CORD_all(header, "void _$", env->namespace->name, "$$initialize(void);\n");
+ header = CORD_all(header, "void ", namespace_prefix(env, env->namespace), "$initialize(void);\n");
return header;
}