Rename get_filter to find.
This commit is contained in:
parent
320c747c2d
commit
aae676c70c
|
@ -134,7 +134,7 @@ void* ht_get(ht* ht, const void* key);
|
||||||
* @param compare the comparison function used to compare adta.
|
* @param compare the comparison function used to compare adta.
|
||||||
* @return the data, or NULL if it is not found.
|
* @return the data, or NULL if it is not found.
|
||||||
*/
|
*/
|
||||||
void* ht_get_filter(ht* ht, const void* key, void* data, compare_func compare);
|
void* ht_find(ht* ht, const void* key, void* data, compare_func compare);
|
||||||
/**
|
/**
|
||||||
* Removes a value from the hash table.
|
* Removes a value from the hash table.
|
||||||
* @param ht the hash table to remove a value from.
|
* @param ht the hash table to remove a value from.
|
||||||
|
|
2
src/ht.c
2
src/ht.c
|
@ -84,7 +84,7 @@ void* ht_get(ht* ht, const void* key) {
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
void* ht_get_filter(ht* ht, const void* key, void* data, compare_func compare) {
|
void* ht_find(ht* ht, const void* key, void* data, compare_func compare) {
|
||||||
void* found = NULL;
|
void* found = NULL;
|
||||||
ht_node* search_node;
|
ht_node* search_node;
|
||||||
unsigned long key_int = ht->hash_func(key) % LIBDS_HT_SIZE;
|
unsigned long key_int = ht->hash_func(key) % LIBDS_HT_SIZE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user