GLib.Variant.new_dict_entry
function new_dict_entry(key: GLib.Variant, value: GLib.Variant): GLib.Variant { // Gjs wrapper for g_variant_new_dict_entry() }
Creates a new dictionary entry GLib.Variant. key and value must be non-null. key must be a value of a basic type (ie: not a container).
If the key or value are floating references (see GLib.Variant.prototype.ref_sink), the new instance takes ownership of them as if via GLib.Variant.prototype.ref_sink.
Since 2.24
- key
a basic GLib.Variant, the key
- value
a GLib.Variant, the value
- Returns
a floating reference to a new dictionary entry GLib.Variant