aboutsummaryrefslogtreecommitdiff
path: root/include/std/hash_map.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-12 01:27:54 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitb35b3e1bf70bf764940498247b1db5bb02761160 (patch)
tree07ad41028fd3d162e9e681a03b75df1cfc740606 /include/std/hash_map.h
parent79bf40f909cefdc611bfa13f70ae55b52ac41d23 (diff)
Starting on ssa
Diffstat (limited to 'include/std/hash_map.h')
-rw-r--r--include/std/hash_map.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/std/hash_map.h b/include/std/hash_map.h
index c36ecc4..97b0745 100644
--- a/include/std/hash_map.h
+++ b/include/std/hash_map.h
@@ -15,21 +15,21 @@ typedef usize(*HashMapHash)(const u8 *data, usize size);
struct HashMap {
ScopedAllocator *allocator; /* borrowed */
Buffer/*HashMapBucket*/ buckets;
- usize type_size;
+ usize value_type_size;
usize num_elements;
HashMapCompare compare_func;
HashMapHash hash_func;
};
-CHECK_RESULT int hash_map_init(HashMap *self, ScopedAllocator *allocator, usize type_size, HashMapCompare compare_func, HashMapHash hash_func);
+CHECK_RESULT int hash_map_init(HashMap *self, ScopedAllocator *allocator, usize value_type_size, HashMapCompare compare_func, HashMapHash hash_func);
/*
Not thread-safe.
-Expected @value size to be @self->type_size.
+Expected @value size to be @self->value_type_size.
*/
CHECK_RESULT int hash_map_insert(HashMap *self, BufferView key, void *value);
/*
Thread-safe unless @hash_map_insert is used in another thread at the same time.
-Expected @value size to be @self->type_size.
+Expected @value size to be @self->value_type_size.
*/
CHECK_RESULT bool hash_map_get(HashMap *self, BufferView key, void *value);