summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-10-15 17:40:10 +0200
committerThomas Haller <thaller@redhat.com>2019-10-18 22:09:18 +0200
commitc02710bb0f64ab94e777be1641c380ff81fe14ce (patch)
treedf9648a4755d5f5fa5b208b30b0a5e0965305639
parent79b383e3b7a27637c896fb0e755802110c185290 (diff)
downloadNetworkManager-c02710bb0f64ab94e777be1641c380ff81fe14ce.tar.gz
shared: add nm_g_source_destroy_and_unref() helper
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h
index 29ff82844f..1252ffe443 100644
--- a/shared/nm-glib-aux/nm-shared-utils.h
+++ b/shared/nm-glib-aux/nm-shared-utils.h
@@ -894,6 +894,13 @@ nm_g_variant_unref_floating (GVariant *var)
g_variant_unref (var);
}
+static inline void
+nm_g_source_destroy_and_unref (GSource *source)
+{
+ g_source_destroy (source);
+ g_source_unref (source);
+}
+
/*****************************************************************************/
static inline int