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

Function strmap_put

strmap.c:108–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void *strmap_put(struct strmap *map, const char *str, void *data)
109{
110 struct strmap_entry *entry = find_strmap_entry(map, str);
111
112 if (entry) {
113 void *old = entry->value;
114 entry->value = data;
115 return old;
116 }
117
118 entry = create_entry(map, str, data);
119 hashmap_add(&map->map, &entry->ent);
120 return NULL;
121}
122
123struct strmap_entry *strmap_get_entry(struct strmap *map, const char *str)
124{

Callers 15

path_msgFunction · 0.85
setup_path_infoFunction · 0.85
compute_collisionsFunction · 0.85
cache_new_pairFunction · 0.85
possibly_cache_new_pairFunction · 0.85
process_entryFunction · 0.85
parse_want_refFunction · 0.85
increment_countFunction · 0.85
packfile_store_add_packFunction · 0.85

Calls 3

find_strmap_entryFunction · 0.85
hashmap_addFunction · 0.85
create_entryFunction · 0.70

Tested by 1

add_delay_entryFunction · 0.68