diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 12:45:29 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 12:52:48 -0500 |
| commit | 649977aae7e5922f992cd69eb84da0a2db368580 (patch) | |
| tree | e61d35b74d2551901cc8f3f034aca7da1f375a8c /src/stdlib/files.c | |
| parent | 88ccdab43c0a3ee53177e21a28724e496406a376 (diff) | |
Split out new()/gc logic from stdlib/util.h
Diffstat (limited to 'src/stdlib/files.c')
| -rw-r--r-- | src/stdlib/files.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
