GNOME Bugzilla – Bug 536542
gtk_list_store_set() documentation doesn't say whether values are copied
Last modified: 2008-09-11 19:31:20 UTC
Documentation Section: gtk+ reference manual Sets the value of one or more cells in the row referenced by iter. The variable argument list should contain integer column numbers, each column number followed by the value to be set. The list is terminated by a -1. For example, to set column 0 with type G_TYPE_STRING to "Foo", you would write gtk_list_store_set (store, iter, 0, "Foo", -1). Correct version: It should say whether a given value (in this case a string) will be copied (g_strdup() etc) by the list_store. The behaviour for passing various types should be defined (G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_OBJECT etc). Other information:
Confirming. The docs for this should be coherent with the one from gtk_tree_model_get (), where it's specified that the value returned has to be unref'd/freed.
Created attachment 115659 [details] [review] patch Adds a note about this in the relevant docs.
patch looks right, please commit.
Committed, closing. 2008-09-11 Cosimo Cecchi <cosimoc@gnome.org> Bug 536542 – gtk_list_store_set() documentation doesn't say whether values are copied. * gtk/gtkliststore.c: * gtk/gtktreestore.c: Explicitly mention in the docs that gtk_[list,tree]_store_set copies or keep a reference of the values.