glib: g_node_traverse() could return a result



Hi everyone,

Might be a good idea if g_node_traverse() could
return the node in question instead of nothing (void).

The node in question is the one which was reported
by GNodeTraverseFunc (by returning TRUE). If the
hook never returned TRUE, g_node_traverse() would
return NULL to signal this.

This would allow encapsulating/nesting, like:

if((node = g_node_traverse(...)))
{
  g_print("found: %s\n", node->something);
}

Cheers,

Oliver 'Bloody' Lange.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]