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 706119 - Add introspection friendly version of gtk_tree_path_new_from_indices
Add introspection friendly version of gtk_tree_path_new_from_indices
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-08-16 11:05 UTC by Simon Feltman
Modified: 2014-01-05 19:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add introspection friendly version of gtk_tree_path_new_from_indices (2.21 KB, patch)
2013-08-16 11:06 UTC, Simon Feltman
reviewed Details | Review
Add introspection friendly version of gtk_tree_path_new_from_indices (2.26 KB, patch)
2013-08-16 13:55 UTC, Simon Feltman
none Details | Review
Add introspection friendly version of gtk_tree_path_new_from_indices (2.25 KB, patch)
2014-01-01 01:05 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-08-16 11:05:04 UTC
This is needed because gtk_tree_path_new_from_indices takes variadic arguments which is not supported by introspection.
Comment 1 Simon Feltman 2013-08-16 11:06:39 UTC
Created attachment 251816 [details] [review]
Add introspection friendly version of gtk_tree_path_new_from_indices

Add gtk_tree_path_new_from_indices_array which takes an array of
integers with a length. Use "Rename to" annotation to rename the
method as gtk_tree_path_new_from_indices. This is needed because
the original method takes variadic arguments which is not supported
by introspection.
Comment 2 Emmanuele Bassi (:ebassi) 2013-08-16 11:52:27 UTC
Review of attachment 251816 [details] [review]:

the vector variants for variadic arguments function usually follow the naming of "original_function_namev()", so this should be named: "gtk_tree_path_new_indicesv()".

::: gtk/gtktreemodel.c
@@ +697,3 @@
+GtkTreePath *
+gtk_tree_path_new_from_indices_array (gint *indices,
+                                      gint  length)

this should probably be a gsize instead.

@@ +700,3 @@
+{
+  GtkTreePath *path;
+

there should probably be some argument validation, like:

  g_return_val_if_fail (length == 0 && indices != NULL, NULL);

to ensure consistency of both array and length. on the other hand, if you don't want to allow NULL arrays then we should enforce it:

  g_return_val_if_fail (indices != NULL && length != 0, NULL);
Comment 3 Simon Feltman 2013-08-16 13:55:23 UTC
Created attachment 251848 [details] [review]
Add introspection friendly version of gtk_tree_path_new_from_indices

Thanks for the review. Updated patch based on comments.
Comment 4 Simon Feltman 2014-01-01 00:57:00 UTC
Bump on this? Obviously the available and since tags need to be updated to 3.12.
Comment 5 Simon Feltman 2014-01-01 01:05:09 UTC
Created attachment 265093 [details] [review]
Add introspection friendly version of gtk_tree_path_new_from_indices

Updated available in, since, and rename-to annotations.
Comment 6 Matthias Clasen 2014-01-05 17:04:49 UTC
Review of attachment 265093 [details] [review]:

looks fine to me now. Should just be added to the docs too
Comment 7 Simon Feltman 2014-01-05 19:57:15 UTC
Attachment 265093 [details] pushed as efa8956 - Add introspection friendly version of gtk_tree_path_new_from_indices

Thanks, pushed with an additional update to gtk3-sections.txt