Method
GObjectValuetake_variant
since: 2.26
Declaration [src]
void
g_value_take_variant (
GValue* value,
GVariant* variant
)
Description [src]
Set the contents of a variant GValue
to variant
, and takes over
the ownership of the caller’s reference to variant
;
the caller doesn’t have to unref it any more (i.e. the reference
count of the variant is not increased).
If variant
was floating then its floating reference is converted to
a hard reference.
If you want the GValue
to hold its own reference to variant
, use
g_value_set_variant()
instead.
This is an internal function introduced mainly for C marshallers.
Available since: 2.26
Parameters
variant
-
Type:
GVariant
A
GVariant
, orNULL
.The argument can be NULL
.The instance takes ownership of the data, and is responsible for freeing it.