diff options
author | Eric Wong <e@80x24.org> | 2019-10-07 02:30:31 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 04:20:10 +0300 |
commit | 28ee7941280828f9e528bd8c5d0f6515a57e0c44 (patch) | |
tree | 8ccc5bad88aad148e83cccfd1835752188d8640a /hashmap.c | |
parent | b6c5241606e67b57470e86ccf547d4ab90008a1d (diff) |
hashmap_remove takes "const struct hashmap_entry *"
This is less error-prone than "const 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>
Diffstat (limited to 'hashmap.c')
-rw-r--r-- | hashmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -218,7 +218,8 @@ void hashmap_add(struct hashmap *map, struct hashmap_entry *entry) } } -void *hashmap_remove(struct hashmap *map, const void *key, const void *keydata) +void *hashmap_remove(struct hashmap *map, const struct hashmap_entry *key, + const void *keydata) { struct hashmap_entry *old; struct hashmap_entry **e = find_entry_ptr(map, key, keydata); |