diff options
author | Thomas Haller <thaller@redhat.com> | 2020-02-27 15:43:28 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-03-17 08:02:54 +0100 |
commit | d3e5eab73423a7df099d4f9317e5159ee47e056a (patch) | |
tree | 8772be0f6f983d012a7d114d70bdc7d0de912983 | |
parent | c3bfd57c699ce69e7cacf04273b199fcb2acf5ef (diff) | |
download | NetworkManager-d3e5eab73423a7df099d4f9317e5159ee47e056a.tar.gz |
shared: add nm_g_variant_is_of_type() helper
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h index 115f9179d5..bba60954b1 100644 --- a/shared/nm-glib-aux/nm-shared-utils.h +++ b/shared/nm-glib-aux/nm-shared-utils.h @@ -1062,6 +1062,14 @@ nm_g_variant_lookup_value (GVariant *dictionary, : NULL; } +static inline gboolean +nm_g_variant_is_of_type (GVariant *value, + const GVariantType *type) +{ + return value + && g_variant_is_of_type (value, type); +} + static inline void nm_g_source_destroy_and_unref (GSource *source) { |