[Mesa-dev] [PATCH 04/15] mesa: Document an odd side-effect of hash_table_insert

Ian Romanick idr at freedesktop.org
Thu Sep 29 10:51:54 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/program/hash_table.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h
index e715bb1..746939c 100644
--- a/src/mesa/program/hash_table.h
+++ b/src/mesa/program/hash_table.h
@@ -88,6 +88,11 @@ extern void *hash_table_find(struct hash_table *ht, const void *key);
 
 /**
  * Add an element to a hash table
+ *
+ * \warning
+ * If \c key is already in the hash table, it will be added again.  Future
+ * calls to \c hash_table_find and \c hash_table_remove will return or remove,
+ * repsectively, the most recently added instance of \c key.
  */
 extern void hash_table_insert(struct hash_table *ht, void *data,
     const void *key);
-- 
1.7.6



More information about the mesa-dev mailing list