Function

GLibVariantnew_dict_entry

Declaration

GVariant*
g_variant_new_dict_entry (
  GVariant* key,
  GVariant* value
)

Description

Creates a new dictionary entry GVariant. 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 g_variant_ref_sink()), the new instance takes ownership of them as if via g_variant_ref_sink().

Available since:2.24

Parameters

key GVariant
 

A basic GVariant, the key.

 The data is owned by the caller of the function.
value GVariant
 

A GVariant, the value.

 The data is owned by the caller of the function.

Return value

Returns: GVariant
 

A floating reference to a new dictionary entry GVariant.

 The data is owned by the called function.