[gtk+/gtk-2-22] annotation (transfer-none) fix that somehow got dropped from last patch
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] annotation (transfer-none) fix that somehow got dropped from last patch
- Date: Mon, 12 Jul 2010 17:11:58 +0000 (UTC)
commit 1a30c3f27208e6c104622097a7e171b8b4053c16
Author: John (J5) Palmieri <johnp redhat com>
Date: Thu Jul 8 15:26:55 2010 -0400
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
gtk/gtktreemodel.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index a4c7bc0..d9cf4e7 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -623,6 +623,31 @@ gtk_tree_path_get_indices (GtkTreePath *path)
}
/**
+ * 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.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]