diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-08-14 11:28:47 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-08-14 11:28:47 -0400 |
commit | 28744043fbaca39dfc9fd1666a8557fd6d8a690f (patch) | |
tree | f0cf30fe98f3e7e535be23c3954973ef02c58e49 /src/shared/hashmap.h | |
parent | 819fb6029dde2af3acf23b0fa25c1851b26ce102 (diff) |
src/shared: import many code cleanups from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/hashmap.h')
-rw-r--r-- | src/shared/hashmap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h index 387c32243e..cfd34750d9 100644 --- a/src/shared/hashmap.h +++ b/src/shared/hashmap.h @@ -24,6 +24,7 @@ #include <stdbool.h> #include "macro.h" +#include "util.h" /* Pretty straightforward hash table implementation. As a minor * optimization a NULL hashmap object will be treated as empty hashmap @@ -73,3 +74,6 @@ char **hashmap_get_strv(Hashmap *h); #define HASHMAP_FOREACH(e, h, i) \ for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL)) + +DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free); +#define _cleanup_hashmap_free_ _cleanup_(hashmap_freep) |