shared: add nm_auto_unset_gvalue macro

This commit is contained in:
Thomas Haller 2016-03-18 16:23:49 +01:00
parent 2c8ef153a1
commit 3025bfc8b2

View file

@ -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 */