summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-02 18:14:25 +0200
committerThomas Haller <thaller@redhat.com>2019-04-04 09:56:19 +0200
commitf63594c26b9f93ba2844b2d0738933ec7169a741 (patch)
tree448c33a7173e05d2c773c9629a80f04f7b43cee5
parentef338667f82919dcd9fa014a590d04c02622074b (diff)
downloadNetworkManager-f63594c26b9f93ba2844b2d0738933ec7169a741.tar.gz
shared: add nm_auto_unref_gmainloop cleanup macro
-rw-r--r--shared/nm-utils/nm-macros-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
index 2f4fd86de7..245bb1d8af 100644
--- a/shared/nm-utils/nm-macros-internal.h
+++ b/shared/nm-utils/nm-macros-internal.h
@@ -323,6 +323,9 @@ _nm_auto_protect_errno (int *p_saved_errno)
NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_unref_gsource, g_source_unref);
#define nm_auto_unref_gsource nm_auto(_nm_auto_unref_gsource)
+NM_AUTO_DEFINE_FCN0 (GMainLoop *, _nm_auto_unref_gmainloop, g_main_loop_unref);
+#define nm_auto_unref_gmainloop nm_auto(_nm_auto_unref_gmainloop)
+
static inline void
_nm_auto_freev (gpointer ptr)
{