From 649977aae7e5922f992cd69eb84da0a2db368580 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 24 Dec 2025 12:45:29 -0500 Subject: Split out new()/gc logic from stdlib/util.h --- src/stdlib/files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stdlib/files.c') diff --git a/src/stdlib/files.c b/src/stdlib/files.c index b0545420..7d56fcfc 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -81,7 +81,8 @@ char *file_base_name(const char *path) { static file_t *_load_file(const char *filename, FILE *file) { if (!file) return NULL; - file_t *ret = new (file_t, .filename = filename); + file_t *ret = GC_MALLOC(sizeof(file_t)); + ret->filename = filename; size_t file_size = 0, line_cap = 0; char *file_buf = NULL, *line_buf = NULL; -- cgit v1.2.3