summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-24 20:28:27 +0200
committerThomas Haller <thaller@redhat.com>2019-09-22 16:05:50 +0200
commit6a9ab7bb30ce4ca30cc144ea50417c4abd61b2d7 (patch)
tree73ca115239a846207bb941520472bb39923ebad6
parentb911cc17d81eae81e5af796eb48895d7ed32726b (diff)
downloadNetworkManager-6a9ab7bb30ce4ca30cc144ea50417c4abd61b2d7.tar.gz
shared: add nm_auto_unref_io_channel 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 5c3b06717e..0597621b02 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 (GIOChannel *, _nm_auto_unref_io_channel, g_io_channel_unref)
+#define nm_auto_unref_io_channel nm_auto(_nm_auto_unref_io_channel)
+
NM_AUTO_DEFINE_FCN0 (GMainLoop *, _nm_auto_unref_gmainloop, g_main_loop_unref);
#define nm_auto_unref_gmainloop nm_auto(_nm_auto_unref_gmainloop)