diff options
Diffstat (limited to 'include/std')
-rw-r--r-- | include/std/buffer.h | 1 | ||||
-rw-r--r-- | include/std/hash_map.h | 2 | ||||
-rw-r--r-- | include/std/scoped_allocator.h | 4 |
3 files changed, 2 insertions, 5 deletions
diff --git a/include/std/buffer.h b/include/std/buffer.h index af6b986..7a74d33 100644 --- a/include/std/buffer.h +++ b/include/std/buffer.h @@ -18,6 +18,7 @@ typedef struct { } Buffer; CHECK_RESULT int buffer_init(Buffer *self, struct ScopedAllocator *allocator); +void buffer_deinit(Buffer *self); /* @data can't be null. Use @buffer_append_empty if you want to change the size diff --git a/include/std/hash_map.h b/include/std/hash_map.h index 97b0745..9b31213 100644 --- a/include/std/hash_map.h +++ b/include/std/hash_map.h @@ -33,6 +33,6 @@ Expected @value size to be @self->value_type_size. */ CHECK_RESULT bool hash_map_get(HashMap *self, BufferView key, void *value); -int hash_compare_string(const void *a, const void *b); +int hash_map_compare_string(const void *a, const void *b); #endif diff --git a/include/std/scoped_allocator.h b/include/std/scoped_allocator.h index 60abcce..f037ea5 100644 --- a/include/std/scoped_allocator.h +++ b/include/std/scoped_allocator.h @@ -16,9 +16,6 @@ struct ScopedAllocator { ScopedAllocatorNode head; ScopedAllocatorNode *current; Buffer/*<void*>*/ mems; - /* TODO: Use linked-list instead, since the elements are dynamically allocated anyways */ - /* Find another way to store mutexes */ - Buffer/*<amal_mutex*>*/ mutexes; }; CHECK_RESULT int scoped_allocator_node_init(ScopedAllocatorNode *self); @@ -28,6 +25,5 @@ CHECK_RESULT int scoped_allocator_init(ScopedAllocator *self); void scoped_allocator_deinit(ScopedAllocator *self); CHECK_RESULT int scoped_allocator_alloc(ScopedAllocator *self, usize size, void **mem); CHECK_RESULT int scoped_allocator_add_mem(ScopedAllocator *self, usize *result_index); -CHECK_RESULT int scoped_allocator_create_mutex(ScopedAllocator *self, amal_mutex **mutex); #endif |