summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-26 12:37:50 +0200
committerThomas Haller <thaller@redhat.com>2019-09-22 16:05:50 +0200
commit2667a46874b7b853af0be2645cc38a4e965c3b9e (patch)
tree10bf77cd660a972115e53806bd9f890f0fc9f0f3
parent6a9ab7bb30ce4ca30cc144ea50417c4abd61b2d7 (diff)
downloadNetworkManager-2667a46874b7b853af0be2645cc38a4e965c3b9e.tar.gz
shared: add nm_auto_remove_source cleanup macro
-rw-r--r--shared/nm-glib-aux/nm-macros-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h
index 0597621b02..9292f3699d 100644
--- a/shared/nm-glib-aux/nm-macros-internal.h
+++ b/shared/nm-glib-aux/nm-macros-internal.h
@@ -310,6 +310,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 (guint, _nm_auto_remove_source, g_source_remove);
+#define nm_auto_remove_source nm_auto(_nm_auto_remove_source)
+
NM_AUTO_DEFINE_FCN0 (GIOChannel *, _nm_auto_unref_io_channel, g_io_channel_unref)
#define nm_auto_unref_io_channel nm_auto(_nm_auto_unref_io_channel)