]> git.ipfire.org Git - thirdparty/git.git/commit
hashmap: remove type arg from hashmap_{get,put,remove}_entry
authorEric Wong <e@80x24.org>
Sun, 6 Oct 2019 23:30:42 +0000 (23:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Oct 2019 01:20:12 +0000 (10:20 +0900)
commit404ab78e39fc74c4eb604b6003642ed264f687a6
tree54cea276f612f84304b9420257a8a667d02ccbbe
parent23dee69f53cf5024ca79e0b707dcb03c63f33bef
hashmap: remove type arg from hashmap_{get,put,remove}_entry

Since these macros already take a `keyvar' pointer of a known type,
we can rely on OFFSETOF_VAR to get the correct offset without
relying on non-portable `__typeof__' and `offsetof'.

Argument order is also rearranged, so `keyvar' and `member' are
sequential as they are used as: `keyvar->member'

Signed-off-by: Eric Wong <e@80x24.org>
Reviewed-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 files changed:
attr.c
blame.c
builtin/difftool.c
builtin/fast-export.c
config.c
diff.c
hashmap.c
hashmap.h
merge-recursive.c
name-hash.c
patch-ids.c
range-diff.c
remote.c
revision.c
sub-process.c
submodule-config.c
t/helper/test-hashmap.c