Three more functions for GTree



Hello!
Is there any interest to include these extensions to GTree in glib-1.3?

void g_tree_traverse_interval( GTree*, GTraverseFunc, GTraverseType,
gconstpointer key_min, gconstpointer key_max, gpointer data);
gpointer g_tree_before(GTree*, gconstpointer key );
gpointer g_tree_after(GTree*, gconstpointer key);

g_tree_traverse_interval:
works just like g_tree_traverse, but only on values, whose keys are in the
range between key_max and key_min.

g_tree_before:
returns the closerst key before the given key, or NULL if none exists. The
given key does not have to exist in the tree, but the returned will.

g_tree_after:
works like g_tree_before, but returns the trailing key instead.


I have tested these functions (somewhat), and they appear to be working...
:)





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