diff options
author | Thomas Haller <thaller@redhat.com> | 2019-06-12 10:13:54 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-06-13 16:10:53 +0200 |
commit | b1f5e971f3c81a56c781004a43efdd77f635b696 (patch) | |
tree | 6752515f3b71964253a5d2fa8957af4d011ec3ff | |
parent | 5b721ba90d33a6e3113825a31cfcfffba77ddf3f (diff) | |
download | NetworkManager-b1f5e971f3c81a56c781004a43efdd77f635b696.tar.gz |
shared: add nm_g_variant_ref_sink() util
-rw-r--r-- | shared/nm-glib-aux/nm-macros-internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index 42c11d63ec..5b594a2ab5 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -1249,6 +1249,14 @@ nm_g_variant_ref (GVariant *v) return v; } +static inline GVariant * +nm_g_variant_ref_sink (GVariant *v) +{ + if (v) + g_variant_ref_sink (v); + return v; +} + static inline void nm_g_variant_unref (GVariant *v) { |