MCPcopy Index your code
hub / github.com/git/git / hashmap_entry_init

Function hashmap_entry_init

hashmap.h:293–298  ·  view source on GitHub ↗

* Initializes a hashmap_entry structure. * * `entry` points to the entry to initialize. * `hash` is the hash code of the entry. * * The hashmap_entry structure does not hold references to external resources, * and it is safe to just discard it once you are done with it (i.e. if * your structure was allocated with xmalloc(), you can just free(3) it, * and if it is on stack, you can just let

Source from the content-addressed store, hash-verified

291 * and if it is on stack, you can just let it go out of scope).
292 */
293static inline void hashmap_entry_init(struct hashmap_entry *e,
294 unsigned int hash)
295{
296 e->hash = hash;
297 e->next = NULL;
298}
299
300/*
301 * Return the number of items in the map.

Callers 15

configset_find_elementFunction · 0.85
configset_add_valueFunction · 0.85
hashmap_get_from_hashFunction · 0.85
populate_worktree_mapFunction · 0.85
get_worktree_pathFunction · 0.85
insert_file_tableFunction · 0.85
get_fingerprintFunction · 0.85
find_exact_matchesFunction · 0.85
add_delta_base_cacheFunction · 0.85
paths_and_oids_insertFunction · 0.85
label_oidFunction · 0.85

Calls

no outgoing calls

Tested by 2

alloc_test_entryFunction · 0.68
perf_hashmapFunction · 0.68