mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
g_variant_get_strv: support objects and signatures
This commit is contained in:
parent
118d59ba15
commit
7026365db2
@ -1211,7 +1211,10 @@ g_variant_get_strv (GVariant *value,
|
||||
gsize n;
|
||||
gsize i;
|
||||
|
||||
TYPE_CHECK (value, G_VARIANT_TYPE ("as"), NULL);
|
||||
g_return_val_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE ("as")) ||
|
||||
g_variant_is_of_type (value, G_VARIANT_TYPE ("ao")) ||
|
||||
g_variant_is_of_type (value, G_VARIANT_TYPE ("ag")),
|
||||
NULL);
|
||||
|
||||
g_variant_get_data (value);
|
||||
n = g_variant_n_children (value);
|
||||
@ -1260,7 +1263,10 @@ g_variant_dup_strv (GVariant *value,
|
||||
gsize n;
|
||||
gsize i;
|
||||
|
||||
TYPE_CHECK (value, G_VARIANT_TYPE ("as"), NULL);
|
||||
g_return_val_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE ("as")) ||
|
||||
g_variant_is_of_type (value, G_VARIANT_TYPE ("ao")) ||
|
||||
g_variant_is_of_type (value, G_VARIANT_TYPE ("ag")),
|
||||
NULL);
|
||||
|
||||
n = g_variant_n_children (value);
|
||||
strv = g_new (gchar *, n + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user