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 502266 - [docs] [GtkTreeSelection] gtk_tree_selection_get_selected_rows free example produces warnings
[docs] [GtkTreeSelection] gtk_tree_selection_get_selected_rows free example p...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
2.19.x
Other All
: Normal trivial
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-12-07 06:09 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2009-12-19 01:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Cast to GFunc (882 bytes, patch)
2009-12-18 03:38 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2007-12-07 06:09:38 UTC
It reads:

"Creates a list of path of all selected rows. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of GtkTreeRowReferences. To do this, you can use gtk_tree_row_reference_new().

To free the return value, use:

g_list_foreach (list, gtk_tree_path_free, NULL);
g_list_free (list);"

that gtk_tree_path_free produces a warning while building if it's not casted to GFunc.
To fix the warning and the docs, just add (GFunc) in front:

g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
Comment 1 Javier Jardón (IRC: jjardon) 2009-12-18 03:38:31 UTC
Created attachment 149966 [details] [review]
Cast to GFunc
Comment 2 Murray Cumming 2009-12-18 09:33:03 UTC
Looks good to me.
Comment 3 Murray Cumming 2009-12-18 09:37:36 UTC
Review of attachment 149966 [details] [review]:

Looks good (trying to use the review system).
Comment 4 Javier Jardón (IRC: jjardon) 2009-12-19 01:10:27 UTC
Comment on attachment 149966 [details] [review]
Cast to GFunc

commit 7e114752988f4bf62034aa91dec496f980389f95
Comment 5 Javier Jardón (IRC: jjardon) 2009-12-19 01:10:55 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release.

Thanks Diego for your bug report.