From 3025bfc8b277992dcdd25347c7094ed8a06c32a9 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 18 Mar 2016 16:23:49 +0100 Subject: [PATCH] shared: add nm_auto_unset_gvalue macro --- shared/nm-macros-internal.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shared/nm-macros-internal.h b/shared/nm-macros-internal.h index 152cbf67e..417623180 100644 --- a/shared/nm-macros-internal.h +++ b/shared/nm-macros-internal.h @@ -36,6 +36,13 @@ #define nm_auto_free nm_auto(_nm_auto_free_impl) GS_DEFINE_CLEANUP_FUNCTION(void*, _nm_auto_free_impl, free) +static inline void +_nm_auto_unset_gvalue_impl (GValue *v) +{ + g_value_unset (v); +} +#define nm_auto_unset_gvalue nm_auto(_nm_auto_unset_gvalue_impl) + /********************************************************/ /* http://stackoverflow.com/a/11172679 */ -- 2.17.1