summaryrefslogtreecommitdiff
path: root/src/std/mem.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
commitaa0fe8457cfff9c47c0c9fa4a1c86a79c7cbf9c5 (patch)
treea7fa374cb59c6c59e386086dcdae8a7efc372b5f /src/std/mem.c
parent2e2c57a8c04575eec164279a49947cfdba250853 (diff)
add a pool insert function. move RenderEnt to use handles
Diffstat (limited to 'src/std/mem.c')
-rw-r--r--src/std/mem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/std/mem.c b/src/std/mem.c
index 4a4454a..a537330 100644
--- a/src/std/mem.c
+++ b/src/std/mem.c
@@ -126,3 +126,10 @@ void void_pool_dealloc(void_pool* pool, u32 raw_handle) {
pool->count--;
}
+
+u32 void_pool_insert(void_pool* pool, void* item) {
+ u32 raw_handle;
+ void* item_dest = void_pool_alloc(pool, &raw_handle);
+ memcpy(item_dest, item, pool->entry_size);
+ return raw_handle;
+} \ No newline at end of file