Top |
#define | G_VALUE_COLLECT_INIT() |
#define | G_VALUE_COLLECT_INIT2() |
#define | G_VALUE_COLLECT() |
#define | G_VALUE_COLLECT_SKIP() |
#define | G_VALUE_LCOPY() |
The macros in this section provide the varargs parsing support needed
in variadic GObject functions such as g_object_new()
or g_object_set()
.
They currently support the collection of integral types, floating point types and pointers.
#define G_VALUE_COLLECT_INIT(value, _value_type, var_args, flags, __error)
Collects a variable argument value from a va_list
.
We have to implement the varargs collection as a macro, because on some
systems va_list
variables cannot be passed by reference.
value |
a GValue return location. |
|
_value_type |
the GType to use for |
|
var_args |
the va_list variable; it may be evaluated multiple times |
|
flags |
flags which are passed on to the |
|
__error |
a gchar** variable that will be modified to hold a |
Since: 2.24
#define G_VALUE_COLLECT_INIT2(value, g_vci_vtab, _value_type, var_args, flags, __error)
A variant of G_VALUE_COLLECT_INIT()
that provides the GTypeValueTable
to the caller.
value |
a GValue return location. |
|
g_vci_vtab |
a GTypeValueTable pointer that will be set to the value table
for |
|
_value_type |
the GType to use for |
|
var_args |
the va_list variable; it may be evaluated multiple times |
|
flags |
flags which are passed on to the |
|
__error |
a gchar** variable that will be modified to hold a |
Since: 2.74
#define G_VALUE_COLLECT(value, var_args, flags, __error)
Collects a variable argument value from a va_list
.
We have to implement the varargs collection as a macro, because on some systems
va_list
variables cannot be passed by reference.
Note: If you are creating the value
argument just before calling this macro,
you should use the G_VALUE_COLLECT_INIT()
variant and pass the uninitialized
GValue. That variant is faster than G_VALUE_COLLECT()
.
value |
a GValue return location. |
|
var_args |
the va_list variable; it may be evaluated multiple times |
|
flags |
flags which are passed on to the |
|
__error |
a gchar** variable that will be modified to hold a |
#define G_VALUE_COLLECT_SKIP(_value_type, var_args)
Skip an argument of type _value_type
from var_args
.
_value_type |
the GType of the value to skip |
|
var_args |
the va_list variable; it may be evaluated multiple times |
#define G_VALUE_LCOPY(value, var_args, flags, __error)
Stores a value’s value into one or more argument locations from a va_list
.
This is the inverse of G_VALUE_COLLECT()
.
value |
a GValue to store into the |
|
var_args |
the va_list variable; it may be evaluated multiple times |
|
flags |
flags which are passed on to the |
|
__error |
a gchar** variable that will be modified to hold a |
#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8)
The maximal number of GTypeCValues which can be collected for a single GValue.