/* Returns: a new #GNode containing the same data pointers  */
GNode* g_node_copy(GNode *node)
/* Returns: a new #GNode containing the same data pointers  */
GNode* g_node_copy(GNode *node)
{
  GNode *new_node = NULL;
  if (node)
    {
      GNode *child;
      new_node = g_node_new (node->data);
      for (child = g_node_last_child (node); child; child = child->prev)
	g_node_prepend (new_node, g_node_copy (child));
    }
  return new_node;
}