Method

GLibTreelookup

Declaration [src]

gpointer
g_tree_lookup (
  GTree* tree,
  gconstpointer key
)

Description [src]

Gets the value corresponding to the given key. Since a GTree is automatically balanced as key/value pairs are added, key lookup is O(log n) (where n is the number of key/value pairs in the tree).

Parameters

key

Type: gconstpointer

The key to look up.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: gpointer

The value corresponding to the key, or NULL if the key was not found.

The data is owned by the instance.
The return value can be NULL.