diff options
author | Thomas Haller <thaller@redhat.com> | 2019-10-15 17:40:10 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-10-18 22:09:18 +0200 |
commit | c02710bb0f64ab94e777be1641c380ff81fe14ce (patch) | |
tree | df9648a4755d5f5fa5b208b30b0a5e0965305639 | |
parent | 79b383e3b7a27637c896fb0e755802110c185290 (diff) | |
download | NetworkManager-c02710bb0f64ab94e777be1641c380ff81fe14ce.tar.gz |
shared: add nm_g_source_destroy_and_unref() helper
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 7 |
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 |