summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-11-02 15:36:41 +0100
committerThomas Haller <thaller@redhat.com>2019-11-07 11:34:36 +0100
commit3b95905ae325db5927ac06ca5eae0fc47afb829f (patch)
tree3f855c4fc69f9fc1c8531a3ce29c764f9c3f7abc
parent01335ecec6c95042e43729b27694c88cd725c413 (diff)
downloadNetworkManager-3b95905ae325db5927ac06ca5eae0fc47afb829f.tar.gz
shared: add nm_auto_destroy_and_unref_gsource macro
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h
index 380c7b766a..2ffb972746 100644
--- a/shared/nm-glib-aux/nm-shared-utils.h
+++ b/shared/nm-glib-aux/nm-shared-utils.h
@@ -925,6 +925,9 @@ nm_g_source_destroy_and_unref (GSource *source)
g_source_unref (source);
}
+NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_destroy_and_unref_gsource, nm_g_source_destroy_and_unref);
+#define nm_auto_destroy_and_unref_gsource nm_auto(_nm_auto_destroy_and_unref_gsource)
+
/*****************************************************************************/
static inline int