From 928238bdcbc78c4196eb4a3508808c79e31f7c84 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Wed, 14 May 2025 12:19:34 -0500 Subject: Update signatures of free-type functions to match the freecallback signature --- src/arena.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/arena.h') diff --git a/src/arena.h b/src/arena.h index 1c1c576..907a2fa 100644 --- a/src/arena.h +++ b/src/arena.h @@ -26,10 +26,7 @@ arena * arena_init(size_t bytes); void * arena_alloc(arena * const arena, size_t bytes); // Free an arena its memory pool(s). Returns -1 and sets `errno` if the given arena is NULL -int arena_free(arena **arena); - -// Clear an arena of its contents (frees and inits an arena in 1). Returns -1 and sets `errno` if the given arena is NULL -int arena_clear(arena **arena); +void arena_free(void *a); // Initializes a simple arena. @@ -39,9 +36,6 @@ simplearena * simplearena_init(size_t bytes); void * simplearena_alloc(simplearena * const a, size_t bytes); // Free a simple arena. Exits / returns -1 on error depending on the value of `___VXGG___USE_XALLOC_FOR_ARENAS___` -int simplearena_free(simplearena **a); - -// Clear a simple arena and its memory pool (frees and inits a simple arena in 1). Exits / returns -1 on error depending on the value of `___VXGG___USE_XALLOC_FOR_ARENAS___` -int simplearena_clear(simplearena **a); +void simplearena_free(simplearena *a); #endif \ No newline at end of file -- cgit v1.2.3