refactor: Arena is opaque, init returns error code

Is to make it more consistent, i need to change also later arraylist the
init function so its also more consistent, next is making alloc ensure
capacity first so no using it first or some shit.
This commit is contained in:
2026-05-13 19:57:49 -06:00
parent 3d3b8596cc
commit f981ba92a8
2 changed files with 9 additions and 8 deletions

View File

@@ -5,6 +5,11 @@
#include <stdlib.h>
#include <string.h>
struct Arena {
uint8_t *buffer;
size_t capacity;
size_t offset;
};
ArenaResult arena_init(size_t capacity) {