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 743286 - Mention that the path returned by gtk_tree_row_reference_get_path needs to be freed
Mention that the path returned by gtk_tree_row_reference_get_path needs to be...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
3.14.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-21 10:16 UTC by Debarshi Ray
Modified: 2015-01-24 21:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkTreeModel: Documentation fix (947 bytes, patch)
2015-01-21 10:31 UTC, Debarshi Ray
reviewed Details | Review
GtkTreeModel: Documentation fix (863 bytes, patch)
2015-01-21 12:37 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-01-21 10:16:17 UTC
Valgrind pointed out to me that the GtkTreePath returned by gtk_tree_row_reference_get_path needs to be freed. It would be nice if the documentation mentioned that because GtkTreeRowReference is created from a path and one might think that it is returning its internal copy.
Comment 1 Debarshi Ray 2015-01-21 10:31:57 UTC
Created attachment 295080 [details] [review]
GtkTreeModel: Documentation fix
Comment 2 Emmanuele Bassi (:ebassi) 2015-01-21 10:56:57 UTC
Review of attachment 295080 [details] [review]:

::: gtk/gtktreemodel.c
@@ +2402,3 @@
  *
+ * Returns: (transfer full): a current path, or %NULL. The returned
+ * path should be freed with gtk_tree_path_free() when no longer

the annotation ought to be enough. it should also include (nullable).

we're kind of moving away from explicitly mentioning the free_func in documentation, since we're going to generate documentation for non-C languages from the same source, and the free function won't apply to, say, JavaScript or Python.
Comment 3 Debarshi Ray 2015-01-21 12:36:50 UTC
(In reply to comment #2)

Thanks for taking look, Emmanuele.

> Review of attachment 295080 [details] [review]:
> 
> ::: gtk/gtktreemodel.c
> @@ +2402,3 @@
>   *
> + * Returns: (transfer full): a current path, or %NULL. The returned
> + * path should be freed with gtk_tree_path_free() when no longer
> 
> the annotation ought to be enough. it should also include (nullable).
> 
> we're kind of moving away from explicitly mentioning the free_func in
> documentation, since we're going to generate documentation for non-C languages
> from the same source, and the free function won't apply to, say, JavaScript or
> Python.

Ok, I will fix that.
Comment 4 Debarshi Ray 2015-01-21 12:37:23 UTC
Created attachment 295091 [details] [review]
GtkTreeModel: Documentation fix
Comment 5 Matthias Clasen 2015-01-24 21:16:51 UTC
Attachment 295091 [details] pushed as aa0811d - GtkTreeModel: Documentation fix