summaryrefslogtreecommitdiff
path: root/lib/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/hash.h b/lib/hash.h
index 12c214e469..2b4ea48f38 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -167,7 +167,9 @@ hash_create_size(unsigned int size, unsigned int (*hash_key)(void *),
* hash table to operate on
*
* data
- * data to insert or retrieve
+ * data to insert or retrieve - A hash backet will not be created if
+ * the alloc_func returns a NULL pointer and nothing will be added to
+ * the hash. As such backet->data will always be non-NULL.
*
* alloc_func
* function to call if the item is not found in the hash table. This
@@ -236,6 +238,8 @@ extern void *hash_release(struct hash *hash, void *data);
* during the walk will cause undefined behavior in that some new entries
* will be walked and some will not. So do not do this.
*
+ * The backet passed to func will have a non-NULL data pointer.
+ *
* hash
* hash table to operate on
*
@@ -256,6 +260,8 @@ extern void hash_iterate(struct hash *hash,
* during the walk will cause undefined behavior in that some new entries
* will be walked and some will not. So do not do this.
*
+ * The backet passed to func will have a non-NULL data pointer.
+ *
* hash
* hash table to operate on
*