After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 536542 - gtk_list_store_set() documentation doesn't say whether values are copied
gtk_list_store_set() documentation doesn't say whether values are copied
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
2.10.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-04 05:02 UTC by Matt Johnston
Modified: 2008-09-11 19:31 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch (1.06 KB, patch)
2008-08-01 09:24 UTC, Cosimo Cecchi
committed Details | Review

Description Matt Johnston 2008-06-04 05:02:58 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:
Comment 1 Cosimo Cecchi 2008-08-01 09:14:53 UTC
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.
Comment 2 Cosimo Cecchi 2008-08-01 09:24:42 UTC
Created attachment 115659 [details] [review]
patch

Adds a note about this in the relevant docs.
Comment 3 Emmanuele Bassi (:ebassi) 2008-09-11 18:52:34 UTC
patch looks right, please commit.
Comment 4 Cosimo Cecchi 2008-09-11 19:31:20 UTC
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.