summaryrefslogtreecommitdiff
path: root/src/gehashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gehashmap.h')
-rw-r--r--src/gehashmap.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gehashmap.h b/src/gehashmap.h
index 4cd35e2..0a3d7c1 100644
--- a/src/gehashmap.h
+++ b/src/gehashmap.h
@@ -36,9 +36,9 @@
size_t n##_key_hash(k);
#define GEHASHMAP_IMPL(k, v, n) \
- /* Function to initialize a new hashmap. Allocation of the hashmap is \
- * left up to the library user. On error -1 is returned, otherwise 0 \
- * is returned. \
+ /* Function to initialize a new hashmap. Allocation of the hashmap is
+ * left up to the library user. On error -1 is returned, otherwise 0 is
+ * returned.
*/ \
int \
n##_new(n##_t *map) \
@@ -68,9 +68,9 @@
free(map->entries); \
} \
\
- /* Function to resize a hashmap. This function should not really be \
- * touched by the library user basically ever. On error -1 is \
- * returned, otherwise 0 is returned. \
+ /* Function to resize a hashmap. This function should not really be
+ * touched by the library user basically ever. On error -1 is returned,
+ * otherwise 0 is returned.
*/ \
int \
n##_resize(n##_t *map, size_t new_capacity) \
@@ -99,10 +99,10 @@
return 0; \
} \
\
- /* Function to put a key/value pair into a hashmap. The key is put \
- * into the hashmap as is, so the user may need to allocate the key \
- * themselves if a stack allocated key is not appropriate. On error \
- * -1 is returned, otherwise 0 is returned. \
+ /* Function to put a key/value pair into a hashmap. The key is put into
+ * the hashmap as is, so the user may need to allocate the key
+ * themselves if a stack allocated key is not appropriate. On error
+ * -1 is returned, otherwise 0 is returned.
*/ \
int \
n##_set(n##_t *map, k key, v val) \
@@ -137,10 +137,10 @@
return 0; \
} \
\
- /* Function to get an element from the hashmap. If “val” is NULL then \
- * no value will be retrieved. If an element with the given key is \
- * found in the hashmap the function returns true, otherwise false is \
- * returned. \
+ /* Function to get an element from the hashmap. If “val” is NULL then
+ * no value will be retrieved. If an element with the given key is
+ * found in the hashmap the function returns true, otherwise false is
+ * returned.
*/ \
bool \
n##_get(n##_t *map, k key, v *val) \
@@ -160,20 +160,20 @@
return false; \
} \
\
- /* Function to check if an element with a given key is contained \
- * within a hashmap. This is just a more readable wrapper around the \
- * get() function that passes NULL as the last argument. \
+ /* Function to check if an element with a given key is contained within
+ * a hashmap. This is just a more readable wrapper around the n##_get()
+ * function that passes NULL as the last argument.
*/ \
bool \
n##_has(n##_t *map, k key) \
{ \
return n##_get(map, key, NULL); \
} \
- \
- /* Function to remove an element with a given key from a hashmap. If \
- * the value was dynamically allocated it will not be freed. The key \
- * will be freed however as per n##_key_free(). On error -1 is \
- * returned, otherwise 0 is returned. \
+ \
+ /* Function to remove an element with a given key from a hashmap. If
+ * the value was dynamically allocated it will not be freed. The key
+ * will be freed however as per n##_key_free(). On error -1 is
+ * returned, otherwise 0 is returned.
*/ \
int \
n##_remove(n##_t *map, k key) \