diff options
author | Eric Wong <e@80x24.org> | 2019-10-07 01:30:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 03:20:10 +0200 |
commit | f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91 (patch) | |
tree | c66cbc464d075f07fedf1ab338a33fbc66c46638 /hashmap.h | |
parent | hashmap_entry_init takes "struct hashmap_entry *" (diff) | |
download | git-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.tar.xz git-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.zip |
hashmap_get_next 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.h')
-rw-r--r-- | hashmap.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -318,7 +318,8 @@ static inline void *hashmap_get_from_hash(const struct hashmap *map, * `entry` is the hashmap_entry to start the search from, obtained via a previous * call to `hashmap_get` or `hashmap_get_next`. */ -void *hashmap_get_next(const struct hashmap *map, const void *entry); +void *hashmap_get_next(const struct hashmap *map, + const struct hashmap_entry *entry); /* * Adds a hashmap entry. This allows to add duplicate entries (i.e. |