2
2
Varargs Value Collection
4
4
<!-- ##### SECTION Short_Description ##### -->
5
Converting varargs to generic values
7
7
<!-- ##### SECTION Long_Description ##### -->
9
The macros in this section provide the varargs parsing support needed
10
in variadic GObject functions such as g_object_new() or g_object_set().
11
They currently support the collection of integral types, floating point
15
13
<!-- ##### SECTION See_Also ##### -->
20
19
<!-- ##### SECTION Stability_Level ##### -->
23
22
<!-- ##### UNION GTypeCValue ##### -->
25
A union holding one collected value.
29
28
<!-- ##### MACRO G_VALUE_COLLECT ##### -->
31
Collects a variable argument value from a va_list. We have to
32
implement the varargs collection as a macro, because on some systems
33
va_list variables cannot be passed by reference.
36
@value: a #GValue return location. @value is supposed to be initialized
37
according to the value type to be collected
38
@var_args: the va_list variable; it may be evaluated multiple times
39
@flags: flags which are passed on to the collect_value() function of
40
the #GTypeValueTable of @value.
41
@__error: a #gchar** variable that will be modified to hold a g_new()
42
allocated error messages if something fails
45
39
<!-- ##### MACRO G_VALUE_LCOPY ##### -->
47
Collects a value's variable argument locations from a va_list.
50
@value: a #GValue return location. @value is supposed to be initialized
51
according to the value type to be collected
52
@var_args: the va_list variable; it may be evaluated multiple times
53
@flags: flags which are passed on to the lcopy_value() function of
54
the #GTypeValueTable of @value.
55
@__error: a #gchar** variable that will be modified to hold a g_new()
56
allocated error messages if something fails
59
50
<!-- ##### MACRO G_VALUE_COLLECT_FORMAT_MAX_LENGTH ##### -->
61
The maximal number of #GTypeCValue<!-- -->s which can be collected for a