macros: add nm_clear_g_variant() util
This commit is contained in:

committed by
Beniamino Galvani

parent
d3d2b49400
commit
2041e140bf
@@ -218,6 +218,17 @@ nm_clear_g_signal_handler (gpointer self, guint *id)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline gboolean
|
||||||
|
nm_clear_g_variant (GVariant **variant)
|
||||||
|
{
|
||||||
|
if (variant && *variant) {
|
||||||
|
g_variant_unref (*variant);
|
||||||
|
*variant = NULL;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* Determine whether @x is a power of two (@x being an integer type).
|
/* Determine whether @x is a power of two (@x being an integer type).
|
||||||
|
Reference in New Issue
Block a user