Value.takeVariant

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). It is a programmer error to pass a floating variant to this function. In particular this means that callbacks in closures, and signal handlers for signals of return type G_TYPE_VARIANT, must never return floating variants. 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. Since 2.26

class Value
void
takeVariant

Parameters

variant Variant

a GVariant, or NULL

Meta