Lines Matching refs:key
113 h = hash_bits(map->hash_fn(cur->key, map->ctx), new_cap_bits); in hashmap_grow()
126 const void *key, size_t hash, in hashmap_find_entry() argument
138 if (map->equal_fn(cur->key, key, map->ctx)) { in hashmap_find_entry()
149 int hashmap__insert(struct hashmap *map, const void *key, void *value, in hashmap__insert() argument
162 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert()
164 hashmap_find_entry(map, key, h, NULL, &entry)) { in hashmap__insert()
166 *old_key = entry->key; in hashmap__insert()
171 entry->key = key; in hashmap__insert()
186 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert()
193 entry->key = key; in hashmap__insert()
201 bool hashmap__find(const struct hashmap *map, const void *key, void **value) in hashmap__find() argument
206 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__find()
207 if (!hashmap_find_entry(map, key, h, NULL, &entry)) in hashmap__find()
215 bool hashmap__delete(struct hashmap *map, const void *key, in hashmap__delete() argument
221 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__delete()
222 if (!hashmap_find_entry(map, key, h, &pprev, &entry)) in hashmap__delete()
226 *old_key = entry->key; in hashmap__delete()