]> git.ipfire.org Git - thirdparty/git.git/commit - hashmap.h
hashmap: add usage documentation explaining hashmap_free[_entries]()
authorElijah Newren <newren@gmail.com>
Tue, 13 Oct 2020 00:40:41 +0000 (00:40 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Oct 2020 20:06:37 +0000 (13:06 -0700)
commit6474b869393b2d40b6e1b3ab5633ce2bad6abe48
tree5cd8cc64989424c943e5d6138b3c5c8722cded72
parentd4a392452e292ff924e79ec8458611c0f679d6d4
hashmap: add usage documentation explaining hashmap_free[_entries]()

The existence of hashmap_free() and hashmap_free_entries() confused me,
and the docs weren't clear enough.  We are dealing with a map table,
entries in that table, and possibly also things each of those entries
point to.  I had to consult other source code examples and the
implementation.  Add a brief note to clarify the differences.  This will
become even more important once we introduce a new
hashmap_partial_clear() function which will add the question of whether
the table itself has been freed.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hashmap.h