diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-07-26 13:30:24 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-07-26 13:30:24 -0400 |
| commit | b2e752ee3257e967fa4796b39054a7f32629291d (patch) | |
| tree | e87ef2581de45301571b0c9d79bad78aaa4677ae /typecheck.c | |
| parent | cfe46ee393aa3c9a2344a916bccfc4a69d4b8b77 (diff) | |
Replace heap_str with GC_strdup
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/typecheck.c b/typecheck.c index 52af8371..49ebe582 100644 --- a/typecheck.c +++ b/typecheck.c @@ -130,7 +130,7 @@ static env_t *load_module(env_t *env, ast_t *module_ast) env_t *module_env = fresh_scope(env); Table$str_set(env->imports, libname, module_env); - char *libname_id = heap_str(libname); + char *libname_id = GC_strdup(libname); for (char *c = libname_id; *c; c++) { if (!isalnum(*c) && *c != '_') *c = '_'; @@ -147,7 +147,7 @@ static env_t *load_module(env_t *env, ast_t *module_ast) ast_t *ast = parse_file(tm_path, NULL); if (!ast) errx(1, "Could not compile file %s", tm_path); env_t *module_file_env = fresh_scope(module_env); - char *file_prefix = heap_str(file_base_name(line)); + char *file_prefix = GC_strdup(file_base_name(line)); for (char *p = file_prefix; *p; p++) { if (!isalnum(*p) && *p != '_' && *p != '$') *p = '_'; |
