/* Returns: TRUE if the key was found in the #GTree  */
gboolean g_tree_lookup_extended(GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value)
/* Returns: TRUE if the key was found in the #GTree  */
gboolean g_tree_lookup_extended(GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value)
{
  GTreeNode *node;
  g_return_val_if_fail (tree != NULL, FALSE);
  node = g_tree_find_node (tree, lookup_key);
  if (node)
    {
      if (orig_key)
        *orig_key = node->key;
      if (value)
        *value = node->value;
      return TRUE;
    }
  else
    return FALSE;
}