Add uc_htable_remove + test
This commit is contained in:
+10
-1
@@ -48,7 +48,7 @@ struct UHTable {
|
||||
int uc_htable_init(struct UHTable *table, size_t buckets);
|
||||
|
||||
/**
|
||||
* Frees resources of the hash table.
|
||||
* Free resources of the hash table.
|
||||
* @param table hash table to free (does not free @table itself
|
||||
*/
|
||||
void uc_htable_destroy(struct UHTable *table);
|
||||
@@ -201,6 +201,15 @@ void uc_htable_clear(struct UHTable *table);
|
||||
*/
|
||||
void uc_htable_insert(struct UHTable *table, struct UHNode *node, size_t hash);
|
||||
|
||||
/** Remove a node.
|
||||
* If the node pointer is not part of the table,
|
||||
* no action is taken
|
||||
*
|
||||
* @param table table to remove from.
|
||||
* @param node node to remove.
|
||||
*/
|
||||
void uc_htable_remove(struct UHTable *table, struct UHNode *node);
|
||||
|
||||
/** Resize the hash table. This changes the number of buckets, and re-inserts
|
||||
* all nodes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user