diff options
author | Thomas Haller <thaller@redhat.com> | 2019-11-02 15:36:41 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-11-07 11:34:36 +0100 |
commit | 3b95905ae325db5927ac06ca5eae0fc47afb829f (patch) | |
tree | 3f855c4fc69f9fc1c8531a3ce29c764f9c3f7abc | |
parent | 01335ecec6c95042e43729b27694c88cd725c413 (diff) | |
download | NetworkManager-3b95905ae325db5927ac06ca5eae0fc47afb829f.tar.gz |
shared: add nm_auto_destroy_and_unref_gsource macro
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 3 |
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 |