diff options
Diffstat (limited to 'src/stdlib/files.c')
| -rw-r--r-- | src/stdlib/files.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stdlib/files.c b/src/stdlib/files.c index b0545420..78c1bc94 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -12,8 +12,8 @@ #include <string.h> #include <sys/param.h> +#include "../print.h" #include "files.h" -#include "print.h" #include "util.h" static const int tabstop = 4; @@ -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; |
