summaryrefslogtreecommitdiff
path: root/lib/hash.h
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@users.noreply.github.com>2018-07-06 12:30:06 -0300
committerGitHub <noreply@github.com>2018-07-06 12:30:06 -0300
commit76f17a8cc4346efabe5f87b5b2578ed6c8ee6fbf (patch)
tree13cabf590c3a7bde21a8aa01fb805ab2e5c20bb6 /lib/hash.h
parent9d90a8608373c1312b36582a72793a750665a7fe (diff)
parentd76345fa669174c16c6ea746cdf51d77126eea35 (diff)
Merge pull request #2630 from donaldsharp/hashables
revert hash_walk/iterate optimizations
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/hash.h b/lib/hash.h
index c7e670b723..12c214e469 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -232,7 +232,9 @@ extern void *hash_release(struct hash *hash, void *data);
* Iterate over the elements in a hash table.
*
* It is safe to delete items passed to the iteration function from the hash
- * table during iteration.
+ * table during iteration. Please note that adding entries to the 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.
*
* hash
* hash table to operate on
@@ -250,7 +252,9 @@ extern void hash_iterate(struct hash *hash,
* Iterate over the elements in a hash table, stopping on condition.
*
* It is safe to delete items passed to the iteration function from the hash
- * table during iteration.
+ * table during iteration. Please note that adding entries to the 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.
*
* hash
* hash table to operate on