shared: add nm_auto_unset_gvalue macro
authorThomas Haller <thaller@redhat.com>
Fri, 18 Mar 2016 15:23:49 +0000 (16:23 +0100)
committerThomas Haller <thaller@redhat.com>
Sat, 26 Mar 2016 11:10:53 +0000 (12:10 +0100)
shared/nm-macros-internal.h

index 152cbf6..4176231 100644 (file)
 #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 */