GLib.VariantBuilder.prototype.end
function end(): GLib.Variant {
// Gjs wrapper for g_variant_builder_end()
}
Ends the builder process and returns the constructed value.
It is not permissible to use builder in any way after this call except for reference counting operations (in the case of a heap-allocated GLib.VariantBuilder) or by reinitialising it with GLib.VariantBuilder.init (in the case of stack-allocated).
It is an error to call this function in any way that would create an inconsistent value to be constructed (ie: insufficient number of items added to a container with a specific number of children required). It is also an error to call this function if the builder was created with an indefinite array or maybe type and no children have been added; in this case it is impossible to infer the type of the empty array.
Since 2.24
- Returns
a new, floating, GLib.Variant