/* Returns: the found #GNode, or NULL if the data is not found  */
GNode* g_node_find(GNode *root, GTraverseType order, GTraverseFlags flags, gpointer data)
/* Returns: the found #GNode, or NULL if the data is not found  */
GNode* g_node_find(GNode *root, GTraverseType order, GTraverseFlags flags, gpointer data)
{
  gpointer d[2];
  g_return_val_if_fail (root != NULL, NULL);
  g_return_val_if_fail (order <= G_LEVEL_ORDER, NULL);
  g_return_val_if_fail (flags <= G_TRAVERSE_MASK, NULL);
  d[0] = data;
  d[1] = NULL;
  g_node_traverse (root, order, flags, -1, g_node_find_func, d);
  return d[1];
}