[glib: 1/2] gicon: Clarify GVariant refcounting in docs



commit f6ed9503d032ffff0f95e662d065e7bbbc46ec98
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Mar 31 14:27:00 2020 +0100

    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>

 gio/gicon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gicon.c b/gio/gicon.c
index 4f73d7568..42c0a096a 100644
--- a/gio/gicon.c
+++ b/gio/gicon.c
@@ -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
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]