gvariant: Document the need to cast varargs when constructing GVariants
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 21 Nov 2013 17:39:16 +0000 (17:39 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 5 Feb 2014 09:40:49 +0000 (09:40 +0000)
commit2b8edf234c9f1926ca2b24bf431fc1c8dc7c4ecf
treed1e5f102df3911e7b899d8ba5bcc663eaf0614bd
parent3f3d2976d1102eb202e58e42793a511d01d10604
gvariant: Document the need to cast varargs when constructing GVariants

Slightly expand on the documentation about casting varargs when
constructing GVariants, and link to it from all the functions where it’s
a necessary consideration.

Add an example of passing flags to a ‘t’ type variable (guint64).
Assuming the flags enum does not have many members, the flag variable
will be 32 bits wide, and needs an explicit cast to be passed into
g_variant_new() as a 64-bit value.

https://bugzilla.gnome.org/show_bug.cgi?id=712837
docs/reference/glib/gvariant-varargs.xml
glib/gvariant-parser.c
glib/gvariant.c