Documentation for e.g. g_variant_get
Hi,
The glib website [1] suggested filing an issue for documentation issues, so here goes.
It's not clear to me from the documentation for e.g. g_variant_get() [2] how one can pass "dummy" parameters for any aspect of the variant extraction which the user is not actually interested in.
For example, imagine a format string of the type "(&sa{sv}as)" (as used by certain Bluez messages over DBus). If I wish to extract the first and second elements of the tuple, but ignore the third, how might I accomplish this? Is it possible to simply pass a NULL destination for the third element to instruct the function to ignore it, e.g.:
const gchar *elem_one;
GVariantIter elem_two;
g_variant_get(params, "(&sa{sv}as)", &elem_one, &elem_two, NULL);
The documentation does not indicate what happens with a NULL parameter. Is this the correct way to approach this issue? If so, can the documentation be updated?
Thanks,
John.
[1] https://developer.gnome.org/glib/stable/glib-resources.html
[2] https://developer.gnome.org/glib/stable/glib-GVariant.html#g-variant-get