hashmap_put takes "struct hashmap_entry *"
This is less error-prone than "void *" as the compiler now detects invalid types being passed. 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
28ee794128
commit
26b455f21e
@ -340,7 +340,7 @@ void hashmap_add(struct hashmap *map, struct hashmap_entry *entry);
|
||||
* `entry` is the entry to add or replace.
|
||||
* Returns the replaced entry, or NULL if not found (i.e. the entry was added).
|
||||
*/
|
||||
void *hashmap_put(struct hashmap *map, void *entry);
|
||||
void *hashmap_put(struct hashmap *map, struct hashmap_entry *entry);
|
||||
|
||||
/*
|
||||
* Removes a hashmap entry matching the specified key. If the hashmap contains
|
||||
|
Reference in New Issue
Block a user