diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-18 02:49:03 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-18 02:54:16 +0100 |
commit | 5e2f14e62b43f713bade20dd9f55db525ac43859 (patch) | |
tree | 32917ae7872672af749ccc3b030af19587d7b0f1 /src/shared/hashmap.h | |
parent | 71ebe743a0ddbd4873967c00e20a57287ae12fc3 (diff) |
busctl: output a single sorted list of names, including activatable and activated
Diffstat (limited to 'src/shared/hashmap.h')
-rw-r--r-- | src/shared/hashmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h index 3d4f6721bc..b912af8d8f 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 @@ -104,3 +105,10 @@ char **hashmap_get_strv(Hashmap *h); #define HASHMAP_FOREACH_BACKWARDS(e, h, i) \ for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL)) + +DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free); +DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free); +DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free_free); +#define _cleanup_hashmap_free_ _cleanup_(hashmap_freep) +#define _cleanup_hashmap_free_free_ _cleanup_(hashmap_free_freep) +#define _cleanup_hashmap_free_free_free_ _cleanup_(hashmap_free_free_freep) |