mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
added new function g_tree_lookup_extended().
2001-03-08 Sven Neumann <sven@gimp.org> * gtree.[ch]: * docs/reference/glib/tmpl/trees-binary.sgml: added new function g_tree_lookup_extended().
This commit is contained in:
committed by
Sven Neumann
parent
9490f8d7e4
commit
e71a64bc86
@@ -17,7 +17,8 @@ To create a new #GTree use g_tree_new().
|
||||
To insert a key/value pair into a #GTree use g_tree_insert().
|
||||
</para>
|
||||
<para>
|
||||
To lookup the value corresponding to a given key, use g_tree_lookup().
|
||||
To lookup the value corresponding to a given key, use g_tree_lookup() and
|
||||
g_tree_lookup_extended().
|
||||
</para>
|
||||
<para>
|
||||
To find out the number of nodes in a #GTree, use g_tree_nnodes().
|
||||
@@ -123,6 +124,22 @@ added, key lookup is very fast.
|
||||
@Returns: the value corresponding to the key.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_tree_lookup_extended ##### -->
|
||||
<para>
|
||||
Gets the original key and the associated value and a gboolean which is
|
||||
TRUE if the key was found. This is useful if you need to free the memory
|
||||
allocated for the original key, for example before calling g_tree_remove().
|
||||
Since a #GTree is automatically balanced as key/value pairs are added,
|
||||
key lookup is very fast.
|
||||
</para>
|
||||
|
||||
@tree: a #GTree.
|
||||
@lookup_key: the key to look up.
|
||||
@orig_key: returns the original key.
|
||||
@value: returns the value associated with the key.
|
||||
@Returns: TRUE if the key was found in the #GTree.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_tree_search ##### -->
|
||||
<para>
|
||||
Searches a #GTree using an alternative form of the comparison function.
|
||||
|
Reference in New Issue
Block a user