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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user