Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcutil / silchashtable.h
index 228887775a990655d5a1c8dbfa0bd34a4eaeef8c..478ea184a6a23128f8d710c899bb26a4de2a151b 100644 (file)
@@ -89,8 +89,8 @@ typedef struct SilcHashTableListStruct SilcHashTableList;
 struct SilcHashTableListStruct {
   SilcHashTable ht;
   void *entry;
-  SilcUInt32 index;
-  bool auto_rehash;
+  unsigned int index        : 31;
+  unsigned int auto_rehash  : 1;
 };
 /***/
 
@@ -138,7 +138,7 @@ typedef bool (*SilcHashCompare)(void *key1, void *key2, void *user_context);
  * DESCRIPTION
  *
  *    A destructor callback that the library will call to destroy the 
- *    `key' and `context'.  The appliation provides the function when
+ *    `key' and `context'.  The application provides the function when
  *    allocating a new hash table. The `user_context' is application
  *    specific context and is delivered to the callback.
  *
@@ -358,7 +358,9 @@ bool silc_hash_table_find_by_context(SilcHashTable ht, void *key,
  *    As the hash table is collision resistant it is possible to save duplicate
  *    keys to the hash table. This function can be used to find all keys
  *    and contexts from the hash table that are found using the `key'. The
- *    `foreach' is called for every found key.
+ *    `foreach' is called for every found key. If no entries can be found
+ *    the `foreach' will be called once with the context set NULL and
+ *    `key' and `user_context' sent to the function.
  *
  * NOTES
  *
@@ -630,7 +632,9 @@ bool silc_hash_table_find_ext(SilcHashTable ht, void *key,
  *    As the hash table is collision resistant it is possible to save duplicate
  *    keys to the hash table. This function can be used to find all keys
  *    and contexts from the hash table that are found using the `key'. The
- *    `foreach' is called for every found key.
+ *    `foreach' is called for every found key. If no entries can be found
+ *    the `foreach' will be called once with the context set NULL and
+ *    `key' and `user_context' sent to the function.
  *
  *    The `hash' and `hash_user_context' are application specified hash
  *    function. If not provided the hash table's default is used.