GVariant: support NULL for empty arrays in varargs
authorRyan Lortie <desrt@desrt.ca>
Fri, 11 Feb 2011 15:14:29 +0000 (10:14 -0500)
committerRyan Lortie <desrt@desrt.ca>
Fri, 11 Feb 2011 15:14:29 +0000 (10:14 -0500)
commitb1d02f9323d4eb157dc99e0b7a79d06a2e510500
tree651502fd5e24a06e739f0981ba3930014e9585f5
parentd25dca2d74cddd66644890760f4d56e619528e14
GVariant: support NULL for empty arrays in varargs

g_variant_new("as", NULL); now gives an empty array of strings, for
example.

This was documented as working already, but was never actually
implemented (due to the fact that it muddies the water when considering
maybe types).  It's being implemented now because its convenience to
programmers exceeds any damage done to the conceptual purity of the API.
docs/reference/glib/gvariant-varargs.xml
glib/gvariant.c
glib/tests/gvariant.c