hashmap: hashmap_{put,remove} return hashmap_entry *
And add *_entry variants to perform container_of as necessary to simplify most callers. Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
87571c3f71
commit
8a973d0bb3
@ -141,7 +141,9 @@ static void cache_remove_path(struct submodule_cache *cache,
|
||||
struct submodule_entry *removed;
|
||||
hashmap_entry_init(&e.ent, hash);
|
||||
e.config = submodule;
|
||||
removed = hashmap_remove(&cache->for_path, &e.ent, NULL);
|
||||
removed = hashmap_remove_entry(&cache->for_path, &e, NULL,
|
||||
struct submodule_entry,
|
||||
ent /* member name */);
|
||||
free(removed);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user