summaryrefslogtreecommitdiff
path: root/gtk/gtktreemodel.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-06-14 16:46:13 -0400
committerColin Walters <walters@verbum.org>2010-06-28 13:50:36 -0400
commiteebb16eb1af11c5327dd06b23df82f7528566739 (patch)
treed29da122bb54ecc166d67e62e14d52784dc5d818 /gtk/gtktreemodel.c
parent289f3b1b2b20f38fdd88d85f0dd2850b2ccbae7f (diff)
downloadgtk+-eebb16eb1af11c5327dd06b23df82f7528566739.tar.gz
Add length to gtk_tree_path_get_indices
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.
Diffstat (limited to 'gtk/gtktreemodel.c')
-rw-r--r--gtk/gtktreemodel.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index 526d1688cf..af162d6384 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -608,36 +608,19 @@ gtk_tree_path_get_depth (GtkTreePath *path)
/**
* gtk_tree_path_get_indices:
* @path: A #GtkTreePath.
- *
- * Returns the current indices of @path. This is an array of integers, each
- * representing a node in a tree. This value should not be freed.
- *
- * Return value: The current indices, or %NULL.
- **/
-gint *
-gtk_tree_path_get_indices (GtkTreePath *path)
-{
- g_return_val_if_fail (path != NULL, NULL);
-
- return path->indices;
-}
-
-/**
- * gtk_tree_path_get_indices_with_depth:
- * @path: A #GtkTreePath.
- * @depth: Number of elements returned in the integer array
+ * @depth: (allow-none): Number of elements returned in the integer array
*
* Returns the current indices of @path.
* This is an array of integers, each representing a node in a tree.
* It also returns the number of elements in the array.
* The array should not be freed.
*
- * Return value: (array length=depth): The current indices, or %NULL.
+ * Return value: (transfer none) (array length=depth): The current indices, or %NULL.
*
* Since: 3.0
**/
gint *
-gtk_tree_path_get_indices_with_depth (GtkTreePath *path, gint *depth)
+gtk_tree_path_get_indices (GtkTreePath *path, gint *depth)
{
g_return_val_if_fail (path != NULL, NULL);
@@ -1854,7 +1837,7 @@ gtk_tree_row_ref_reordered (RowRefList *refs,
if (ref_depth > depth)
{
gint i;
- gint *indices = gtk_tree_path_get_indices (reference->path);
+ gint *indices = gtk_tree_path_get_indices (reference->path, NULL);
for (i = 0; i < length; i++)
{