aboutsummaryrefslogtreecommitdiff
path: root/src_c/pool.h
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2021-12-22 03:31:04 +0100
committerbozo.kopic <bozo@kopic.xyz>2021-12-22 03:31:04 +0100
commit7dedbce91b8cb6cfbb1571f2c6dccb968d93351d (patch)
tree68670b3ff3f2b913fdf79bcbd881dc64de678fb7 /src_c/pool.h
parent3b22a7aee8644b26da7babfc9ea83b9cb8c7289c (diff)
WIP c implementation
Diffstat (limited to 'src_c/pool.h')
-rw-r--r--src_c/pool.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src_c/pool.h b/src_c/pool.h
new file mode 100644
index 0000000..784278e
--- /dev/null
+++ b/src_c/pool.h
@@ -0,0 +1,22 @@
+#ifndef OPCUT_POOL_H
+#define OPCUT_POOL_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct opcut_pool_t opcut_pool_t;
+
+
+opcut_pool_t *opcut_pool_create(size_t item_size);
+void opcut_pool_destroy(opcut_pool_t *pool);
+void *opcut_pool_get(opcut_pool_t *pool);
+void opcut_pool_return(opcut_pool_t *pool, void *item);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif