summaryrefslogtreecommitdiffstats
path: root/hashmap.h
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-07 01:30:32 +0200
committerJunio C Hamano <gitster@pobox.com>2019-10-07 03:20:10 +0200
commit26b455f21ed7e0c7b0e4e4e69b5ae48545597020 (patch)
tree0c0a69083353100d2f637322791f4499e8cb27bf /hashmap.h
parenthashmap_remove takes "const struct hashmap_entry *" (diff)
downloadgit-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.tar.xz
git-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.zip
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>
Diffstat (limited to 'hashmap.h')
-rw-r--r--hashmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hashmap.h b/hashmap.h
index c4c31b462f..d122c75d0f 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -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