From: Thomas Haller Date: Fri, 18 Mar 2016 15:23:49 +0000 (+0100) Subject: shared: add nm_auto_unset_gvalue macro X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=NetworkManager.git;a=commitdiff_plain;h=3025bfc8b277992dcdd25347c7094ed8a06c32a9 shared: add nm_auto_unset_gvalue macro --- 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 */