core: Ad ot_clear_gvariant(), use it

This saves us a conditional.
This commit is contained in:
Colin Walters committed 2011-11-22 10:20:10 -05:00
1 parent 43ae898f65
commit 3c025e526f
12 files changed
+85 -143

No files matched your search

+6
View File
@@ -27,6 +27,12 @@
G_BEGIN_DECLS
#define ot_clear_gvariant(a_v) do { \
if (*a_v) \
g_variant_unref (*a_v); \
*a_v = NULL; \
} while (0);
GHashTable *ot_util_variant_asv_to_hash_table (GVariant *variant);
GVariant * ot_util_variant_take_ref (GVariant *variant);