[gtk/ebassi/doc-fixes] Fix transfer of GtkTreeExpander.get_item()



commit 0c8de4e56130e39020fbf9ee4b8cef9dcaae421e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Dec 2 19:09:10 2020 +0000

    Fix transfer of GtkTreeExpander.get_item()
    
    We return a full reference to the item.
    
    Fixes: #3428

 gtk/gtktreeexpander.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreeexpander.c b/gtk/gtktreeexpander.c
index 5e1de3cf42..84cf90ccfa 100644
--- a/gtk/gtktreeexpander.c
+++ b/gtk/gtktreeexpander.c
@@ -379,7 +379,7 @@ gtk_tree_expander_get_property (GObject    *object,
       break;
 
     case PROP_ITEM:
-      g_value_set_object (value, gtk_tree_expander_get_item (self));
+      g_value_take_object (value, gtk_tree_expander_get_item (self));
       break;
 
     case PROP_LIST_ROW:
@@ -737,10 +737,13 @@ gtk_tree_expander_set_child (GtkTreeExpander *self,
  *
  * Forwards the item set on the #GtkTreeListRow that @self is managing.
  *
- * This call is essentially equivalent to calling
- * `gtk_tree_list_row_get_item (gtk_tree_expander_get_list_row (@self))`.
+ * This call is essentially equivalent to calling:
  *
- * Returns: (nullable) (transfer none) (type GObject): The item of the row
+ * |[<!-- language="C" -->
+ *   gtk_tree_list_row_get_item (gtk_tree_expander_get_list_row (@self));
+ * ]|
+ *
+ * Returns: (nullable) (transfer full) (type GObject): The item of the row
  **/
 gpointer
 gtk_tree_expander_get_item (GtkTreeExpander *self)


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