diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-16 05:25:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-16 05:25:57 +0200 |
commit | dfb33a9737e62ab872d3937b7690b252d2892fe8 (patch) | |
tree | 2cdc28e66d418c32c96cb2572c81cf9a3f8517bb /src/shared/set.h | |
parent | 82da66fb750c91f06e713ff23a5e5c57ff05c2a8 (diff) |
macro: rework how we define cleanup macros
There's now a generic _cleanup_ macro with an argument. The macros for
specific types are now defined using this macro, and in the header files
where they belong.
All cleanup handlers are now inline functions.
Diffstat (limited to 'src/shared/set.h')
-rw-r--r-- | src/shared/set.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/set.h b/src/shared/set.h index 38c4b58a80..8864f7b34e 100644 --- a/src/shared/set.h +++ b/src/shared/set.h @@ -77,3 +77,6 @@ char **set_get_strv(Set *s); #define SET_FOREACH_BACKWARDS(e, s, i) \ for ((i) = ITERATOR_LAST, (e) = set_iterate_backwards((s), &(i)); (e); (e) = set_iterate_backwards((s), &(i))) + +#define _cleanup_set_free_ _cleanup_(set_freep) +#define _cleanup_set_free_free_ _cleanup_(set_free_freep) |