aboutsummaryrefslogtreecommitdiff
path: root/include/std
diff options
context:
space:
mode:
Diffstat (limited to 'include/std')
-rw-r--r--include/std/hash_map.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/std/hash_map.h b/include/std/hash_map.h
index 986576d..b430d22 100644
--- a/include/std/hash_map.h
+++ b/include/std/hash_map.h
@@ -17,7 +17,9 @@ void tsl_hash_map_init(TslHashMap *self);
void tsl_hash_map_deinit(TslHashMap *self);
int tsl_hash_map_insert(TslHashMap *self, const TslStringView *key, const void *data, size_t size, TslHashFunc hash_func);
-/* Get a reference to the value by key @key */
+/* Get a reference to the value by key @key, or NULL if it doesn't exist */
void* tsl_hash_map_get(TslHashMap *self, const TslStringView *key, TslHashFunc hash_func);
+/* Get a reference to the value by key @key, or insert a new value for the key with a size of @size */
+int tsl_hash_map_get_or_create(TslHashMap *self, const TslStringView *key, size_t size, TslHashFunc hash_func, void **output);
#endif /* TSL_HASH_MAP_H */