annotation (transfer-none) fix that somehow got dropped from last patch

* gtk_tree_path_get_indices_with_depth - annotate the return as 'transfer none'
  to avoid double frees
This commit is contained in:
John (J5) Palmieri 2010-07-08 15:26:55 -04:00 committed by Matthias Clasen
parent 72cd4207b7
commit 1a30c3f272

View File

@ -622,6 +622,31 @@ gtk_tree_path_get_indices (GtkTreePath *path)
return path->indices;
}
/**
* gtk_tree_path_get_indices_with_depth:
* @path: A #GtkTreePath.
* @depth: 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) (transfer none): The current indices, or %NULL.
*
* Since: 3.0
**/
gint *
gtk_tree_path_get_indices_with_depth (GtkTreePath *path, gint *depth)
{
g_return_val_if_fail (path != NULL, NULL);
if (depth)
*depth = path->depth;
return path->indices;
}
/**
* gtk_tree_path_free:
* @path: A #GtkTreePath.