summaryrefslogtreecommitdiff
path: root/gtk/gtkflattenlistmodel.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-26 10:53:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-26 14:21:28 -0400
commit7e87ad188748039d35bca0ecf3630f51e717f174 (patch)
treeb9068cb2ab6d40258fdc267485492a484b35e900 /gtk/gtkflattenlistmodel.c
parentef6babf896cd06bd42d0fb11e3aae7c109708bdd (diff)
downloadgtk+-flatten-list-constructor.tar.gz
flattenlistmodel: Make the constructor transfer fullflatten-list-constructor
This is for consistency with other wrapping list constructors. We want them all to be transfer full, allow-none. Update all callers.
Diffstat (limited to 'gtk/gtkflattenlistmodel.c')
-rw-r--r--gtk/gtkflattenlistmodel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkflattenlistmodel.c b/gtk/gtkflattenlistmodel.c
index f4398d853c..cea983f8da 100644
--- a/gtk/gtkflattenlistmodel.c
+++ b/gtk/gtkflattenlistmodel.c
@@ -425,7 +425,7 @@ gtk_flatten_list_model_init (GtkFlattenListModel *self)
/**
* gtk_flatten_list_model_new:
- * @model: (nullable) (transfer none): the model to be flattened
+ * @model: (nullable) (transfer full): the model to be flattened
*
* Creates a new #GtkFlattenListModel that flattens @list.
*
@@ -442,6 +442,9 @@ gtk_flatten_list_model_new (GListModel *model)
"model", model,
NULL);
+ /* we consume the reference */
+ g_clear_object (&model);
+
return result;
}