Macro to insert a new GNode "after" the given sibling.
authorRavi Sankar Guntur <ravi.g@samsung.com>
Sat, 21 Jan 2012 16:47:18 +0000 (22:17 +0530)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 25 Jan 2012 04:41:23 +0000 (23:41 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=626258

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
docs/reference/glib/glib-sections.txt
glib/gnode.c
glib/gnode.h

index 45b2e91..37524b6 100644 (file)
@@ -2469,6 +2469,7 @@ g_node_prepend
 
 <SUBSECTION>
 g_node_insert_data
+g_node_insert_data_after
 g_node_insert_data_before
 g_node_append_data
 g_node_prepend_data
index 9fef8f7..b2c3226 100644 (file)
@@ -53,8 +53,9 @@
  * g_node_insert_before(), g_node_append() and g_node_prepend().
  *
  * To create a new node and insert it into a tree use
- * g_node_insert_data(), g_node_insert_data_before(),
- * g_node_append_data() and g_node_prepend_data().
+ * g_node_insert_data(), g_node_insert_data_after(),
+ * g_node_insert_data_before(), g_node_append_data()
+ * and g_node_prepend_data().
  *
  * To reverse the children of a node use g_node_reverse_children().
  *
index 675b8b1..7ffdcbf 100644 (file)
@@ -169,6 +169,19 @@ GNode*      g_node_find            (GNode            *root,
      g_node_insert ((parent), (position), g_node_new (data))
 
 /**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+#define        g_node_insert_data_after(parent, sibling, data) \
+     g_node_insert_after ((parent), (sibling), g_node_new (data))
+/**
  * g_node_insert_data_before:
  * @parent: the #GNode to place the new #GNode under
  * @sibling: the sibling #GNode to place the new #GNode before