diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2021-12-27 23:03:52 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2021-12-27 23:04:04 +0100 |
| commit | b0aedec7bb1eacf5967a8f086fc7740048873a58 (patch) | |
| tree | a56e148380f7818a18036daf95d0ebde036e505c /src_c/pool.c | |
| parent | fd0be422180178516d6d2bf3fb1f343c9ab79e53 (diff) | |
WIP c implementation
Diffstat (limited to 'src_c/pool.c')
| -rw-r--r-- | src_c/pool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src_c/pool.c b/src_c/pool.c index 619a97d..04968c8 100644 --- a/src_c/pool.c +++ b/src_c/pool.c @@ -66,7 +66,7 @@ void opcut_pool_destroy(opcut_pool_t *pool) { } -void *opcut_pool_get(opcut_pool_t *pool) { +void *opcut_pool_alloc(opcut_pool_t *pool) { if (!pool->items) allocate_block(pool); @@ -78,7 +78,8 @@ void *opcut_pool_get(opcut_pool_t *pool) { return header + 1; } -void opcut_pool_return(opcut_pool_t *pool, void *item) { + +void opcut_pool_free(opcut_pool_t *pool, void *item) { header_t *header = (header_t *)item - 1; header->next = pool->items; pool->items = header; |
