GNOME Bugzilla – Bug 621590
Add length to gtk_tree_path_get_indices
Last modified: 2010-09-19 05:16:38 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.
Created attachment 163631 [details] [review] Add length to gtk_tree_path_get_indices
This seems just like gratitious api breaking. Whats wrong with the _with_depth variant ?
Isn't the whole point of GTK3 to clean up API? Can't we scope in fixing un-introspectable APIs?
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.
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
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.
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.
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
I went with the rename-to annotation.