MCPcopy Create free account
hub / github.com/git/git / hashmap_get_from_hash

Function hashmap_get_from_hash

hashmap.h:351–359  ·  view source on GitHub ↗

* Returns the hashmap entry for the specified hash code and key data, * or NULL if not found. * * `map` is the hashmap structure. * `hash` is the hash code of the entry to look up. * * If an entry with matching hash code is found, `keydata` is passed to * `hashmap_cmp_fn` to decide whether the entry matches the key. The * `entry_or_key` parameter of `hashmap_cmp_fn` points to a hashmap_ent

Source from the content-addressed store, hash-verified

349 * structure that should not be used in the comparison.
350 */
351static inline struct hashmap_entry *hashmap_get_from_hash(
352 const struct hashmap *map,
353 unsigned int hash,
354 const void *keydata)
355{
356 struct hashmap_entry key;
357 hashmap_entry_init(&key, hash);
358 return hashmap_get(map, &key, keydata);
359}
360
361/*
362 * Returns the next equal hashmap entry, or NULL if not found. This can be

Callers 6

label_oidFunction · 0.85
oidmap_getFunction · 0.85
is_known_escape_sequenceFunction · 0.85
perf_hashmapFunction · 0.85
refname_hash_existsFunction · 0.85

Calls 2

hashmap_entry_initFunction · 0.85
hashmap_getFunction · 0.85

Tested by 1

perf_hashmapFunction · 0.68