Lines Matching refs:key
118 h = hash_bits(map->hash_fn(cur->key, map->ctx), new_cap_bits); in hashmap_grow()
131 const long key, size_t hash, in hashmap_find_entry() argument
143 if (map->equal_fn(cur->key, key, map->ctx)) { in hashmap_find_entry()
154 int hashmap_insert(struct hashmap *map, long key, long value, in hashmap_insert() argument
167 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
169 hashmap_find_entry(map, key, h, NULL, &entry)) { in hashmap_insert()
171 *old_key = entry->key; in hashmap_insert()
176 entry->key = key; in hashmap_insert()
191 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
198 entry->key = key; in hashmap_insert()
206 bool hashmap_find(const struct hashmap *map, long key, long *value) in hashmap_find() argument
211 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_find()
212 if (!hashmap_find_entry(map, key, h, NULL, &entry)) in hashmap_find()
220 bool hashmap_delete(struct hashmap *map, long key, in hashmap_delete() argument
226 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_delete()
227 if (!hashmap_find_entry(map, key, h, &pprev, &entry)) in hashmap_delete()
231 *old_key = entry->key; in hashmap_delete()