mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:30:10 +00:00
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:
parent
72cd4207b7
commit
1a30c3f272
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user