]> git.ipfire.org Git - thirdparty/git.git/commit
hashmap: introduce hashmap_free_entries
authorEric Wong <e@80x24.org>
Sun, 6 Oct 2019 23:30:40 +0000 (23:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Oct 2019 01:20:11 +0000 (10:20 +0900)
commitc8e424c9c94d97b18cd335be17f32a8ce94a5b7f
treee8e652183caac5ad5943e423076585889b02d9b3
parent8a973d0bb398d6d83d6c048acecc750d01bd7234
hashmap: introduce hashmap_free_entries

`hashmap_free_entries' behaves like `container_of' and passes
the offset of the hashmap_entry struct to the internal
`hashmap_free_' function, allowing the function to free any
struct pointer regardless of where the hashmap_entry field
is located.

`hashmap_free' no longer takes any arguments aside from
the hashmap itself.

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:
blame.c
builtin/fetch.c
config.c
diff.c
diffcore-rename.c
hashmap.c
hashmap.h
merge-recursive.c
name-hash.c
oidmap.c
patch-ids.c
range-diff.c
ref-filter.c
revision.c
sequencer.c
submodule-config.c
t/helper/test-hashmap.c