gicon: Clarify GVariant refcounting in docs

Slightly unexpectedly, `g_icon_serialize()` doesn’t produce a floating
`GVariant`, it produces one with full ownership and returns that. That’s
not the convention for `GVariant` return values from functions which
build variants, but there’s nothing we can do to change this now as that
would be an API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-03-31 14:27:00 +01:00
parent eae7b0274c
commit f6ed9503d0

View File

@ -558,7 +558,7 @@ g_icon_deserialize_emblemed (GVariant *value)
/**
* g_icon_deserialize:
* @value: a #GVariant created with g_icon_serialize()
* @value: (transfer none): a #GVariant created with g_icon_serialize()
*
* Deserializes a #GIcon previously serialized using g_icon_serialize().
*
@ -653,7 +653,7 @@ g_icon_deserialize (GVariant *value)
* makes sense to transfer the #GVariant between processes on the same machine,
* (as opposed to over the network), and within the same file system namespace.
*
* Returns: (transfer full): a #GVariant, or %NULL when serialization fails.
* Returns: (transfer full): a #GVariant, or %NULL when serialization fails. The #GVariant will not be floating.
*
* Since: 2.38
*/