mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 21:03:10 +02:00
GVariant: fix for g_variant_iter_loop()
This commit is contained in:
parent
3349bab022
commit
d17f4bee17
@ -3473,17 +3473,21 @@ g_variant_valist_get (const gchar **str,
|
|||||||
|
|
||||||
else /* tuple, dictionary entry */
|
else /* tuple, dictionary entry */
|
||||||
{
|
{
|
||||||
GVariantIter iter;
|
gint index = 0;
|
||||||
|
|
||||||
g_assert (**str == '(' || **str == '{');
|
g_assert (**str == '(' || **str == '{');
|
||||||
g_variant_iter_init (&iter, value);
|
|
||||||
|
|
||||||
(*str)++;
|
(*str)++;
|
||||||
while (**str != ')' && **str != '}')
|
while (**str != ')' && **str != '}')
|
||||||
{
|
{
|
||||||
value = g_variant_iter_next_value (&iter);
|
if (value != NULL)
|
||||||
g_variant_valist_get (str, value, free, app);
|
{
|
||||||
g_variant_unref (value);
|
GVariant *child = g_variant_get_child_value (value, index++);
|
||||||
|
g_variant_valist_get (str, child, free, app);
|
||||||
|
g_variant_unref (child);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_variant_valist_get (str, NULL, free, app);
|
||||||
}
|
}
|
||||||
(*str)++;
|
(*str)++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user