mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
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
This commit is contained in:
@@ -466,6 +466,7 @@
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
<anchor id='gvariant-varargs'/>
|
||||
<para>
|
||||
Note that in C, small integer types in variable argument lists are promoted up to <link
|
||||
linkend='gint'><type>int</type></link> or <link linkend='guint'><type>unsigned int</type></link> as appropriate, and
|
||||
|
Reference in New Issue
Block a user