diff options
| author | LLLL Colonq <llll@colonq> | 2026-06-29 22:59:28 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-06-29 22:59:28 -0400 |
| commit | 1d4447bcd888dd0bd20cf4b6dd7f9192145debf0 (patch) | |
| tree | ee17e782943bed78bdf461c7fe876712127a0d28 /src/native.c | |
| parent | 8909986b89eaac74bb4cd8dc7019f96e4f650470 (diff) | |
Refactor data structures
Diffstat (limited to 'src/native.c')
| -rw-r--r-- | src/native.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/native.c b/src/native.c index b8cde3d..7af961b 100644 --- a/src/native.c +++ b/src/native.c @@ -51,7 +51,7 @@ pit_value pit_bytes_new_file(pit_runtime *rt, char *path) { fseek(f, 0, SEEK_END); i64 len = ftell(f); fseek(f, 0, SEEK_SET); - u8 *dest = pit_arena_alloc_bulk(rt->heap, len); + u8 *dest = pit_arena_alloc_array(rt->heap, len); if (!dest) { pit_error(rt, "failed to allocate bytes"); fclose(f); return PIT_NIL; } if ((size_t) len != fread(dest, sizeof(char), (size_t) len, f)) { fclose(f); |
