From dfb33a9737e62ab872d3937b7690b252d2892fe8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 16 Apr 2013 05:25:57 +0200 Subject: 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. --- src/shared/strv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/shared/strv.h') diff --git a/src/shared/strv.h b/src/shared/strv.h index 4cd3865e1d..92696b02fa 100644 --- a/src/shared/strv.h +++ b/src/shared/strv.h @@ -34,6 +34,8 @@ static inline void strv_freep(char ***l) { strv_free(*l); } +#define _cleanup_strv_free_ _cleanup_(strv_freep) + char **strv_copy(char * const *l) _malloc_; unsigned strv_length(char * const *l); -- cgit v1.2.3-54-g00ecf