VariantDict.init

Initialises a #GVariantDict structure.

If @from_asv is given, it is used to initialise the dictionary.

This function completely ignores the previous contents of @dict. On one hand this means that it is valid to pass in completely uninitialised memory. On the other hand, this means that if you are initialising over top of an existing #GVariantDict you need to first call g_variant_dict_clear() in order to avoid leaking memory.

You must not call g_variant_dict_ref() or g_variant_dict_unref() on a #GVariantDict that was initialised with this function. If you ever pass a reference to a #GVariantDict outside of the control of your own code then you should assume that the person receiving that reference may try to use reference counting; you should use g_variant_dict_new() instead of this function.

class VariantDict
void
init

Parameters

fromAsv Variant

the initial value for @dict

Meta

Since

2.40