summaryrefslogtreecommitdiff
path: root/src/std/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/std/mem.h')
-rw-r--r--src/std/mem.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/std/mem.h b/src/std/mem.h
index 789cba3..c9346cc 100644
--- a/src/std/mem.h
+++ b/src/std/mem.h
@@ -71,21 +71,21 @@ void void_pool_dealloc(void_pool* pool, u32 raw_handle);
// TODO: macro that lets us specialise
/* typedef struct Name##_handle Name##_handle; \ */
-#define TYPED_POOL(T, Name) \
- typedef struct Name##_pool { \
- void_pool inner; \
- } Name##_pool; \
- \
- static Name##_pool Name##_pool_create(arena* a, u64 cap, u64 entry_size) { \
- void_pool p = void_pool_create(a, "\"" #Name "\"", cap, entry_size); \
- return (Name##_pool){ .inner = p }; \
- } \
+#define TYPED_POOL(T, Name) \
+ typedef struct Name##_pool { \
+ void_pool inner; \
+ } Name##_pool; \
+ \
+ static Name##_pool Name##_pool_create(arena* a, u64 cap, u64 entry_size) { \
+ void_pool p = void_pool_create(a, "\"" #Name "\"", cap, entry_size); \
+ return (Name##_pool){ .inner = p }; \
+ } \
static inline T* Name##_pool_get(Name##_pool* pool, Name##Handle handle) { \
- return (T*)void_pool_get(&pool->inner, handle.raw); \
- } \
+ return (T*)void_pool_get(&pool->inner, handle.raw); \
+ } \
static inline T* Name##_pool_alloc(Name##_pool* pool, Name##Handle* out_handle) { \
- return (T*)void_pool_alloc(&pool->inner, &out_handle->raw); \
- } \
+ return (T*)void_pool_alloc(&pool->inner, &out_handle->raw); \
+ } \
static inline void Name##_pool_dealloc(Name##_pool* pool, Name##Handle handle) { \
- void_pool_dealloc(&pool->inner, handle.raw); \
+ void_pool_dealloc(&pool->inner, handle.raw); \
}\