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 621590 - Add length to gtk_tree_path_get_indices
Add length to gtk_tree_path_get_indices
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-06-14 20:56 UTC by Colin Walters
Modified: 2010-09-19 05:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add length to gtk_tree_path_get_indices (40.09 KB, patch)
2010-06-14 20:56 UTC, Colin Walters
none Details | Review

Description Colin Walters 2010-06-14 20:56:20 UTC
The old version wasn't introspectable as it didn't have a length
return parameter.  Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
Comment 1 Colin Walters 2010-06-14 20:56:22 UTC
Created attachment 163631 [details] [review]
Add length to gtk_tree_path_get_indices
Comment 2 Matthias Clasen 2010-06-14 22:19:08 UTC
This seems just like gratitious api breaking. Whats wrong with the _with_depth variant ?
Comment 3 Colin Walters 2010-06-15 12:36:31 UTC
Isn't the whole point of GTK3 to clean up API?  Can't we scope in fixing un-introspectable APIs?
Comment 4 Javier Jardón (IRC: jjardon) 2010-06-15 15:02:07 UTC
AFAIK, The objective is that a program that compiles with the latest GTK 2.x version will work in GTK+ 3.0 with only a recompilation.

So,  you can't break the API without a previous patch to deprecate the previous functions and indicate their replacements.
Comment 5 Matthias Clasen 2010-06-22 21:00:27 UTC
The un-instrospectable api is already fixed, by the addition of the _with_depth variant. We can certainly deprecate the lacking variant in 2.x and remove it in 3.
But making them switch names seems unnecessarily confusing
Comment 6 Colin Walters 2010-06-22 21:45:46 UTC
If we remove it in 3, why wouldn't we also rename it?

But anyways, we can potentially approach this with the Rename-To annotation, so that to script it will appear without _with_depth.
Comment 7 Emmanuele Bassi (:ebassi) 2010-06-22 22:11:58 UTC
during the IRC meeting we came up with a potential new name that could be introduced to deprecate/ignore the current API:

  gint *gtk_tree_path_to_indices (const GtkTreePath *path, gint *depth);

which maps to the _new_from_indices() constructor, and adds the same symmetry used by the _new_from_string()/to_string() pair.
Comment 8 Matthias Clasen 2010-06-23 16:58:13 UTC
Ok, so the alternative proposals are:

a)

in 2.x:
deprecate gtk_tree_path_get_indices
deprecate gtk_tree_path_get_indices_with_depth
add gtk_tree_path_to_indices

in 3.x:
remove gtk_tree_path_get_indices
remove gtk_tree_path_get_indices_with_depth
add gtk_tree_path_to_indices


b) Simply add a 

Rename To: gtk_tree_path_get_indices

annotation to gtk_tree_path_get_indices_with_depth
Comment 9 Matthias Clasen 2010-09-19 05:16:38 UTC
I went with the rename-to annotation.