man rbhash_lookup (Fonctions bibliothèques) - look up an entry in an RBHash.

NAME

rbhash_lookup - look up an entry in an RBHash.

SYNOPSIS

#include <roy.h>

void * rbhash_lookup (RBHash *hash, RBuf *key);

DESCRIPTION

Look up an entry in an RBHash. key is a regular RBuf. See rbhash(3) for details.

rbhash_lookup_next(3) uses the entry returned from a previous call to rbhash_lookup(3) to return the next entry in the hash table matching the same key as used in rbhash_lookup(3).

RETURN VALUE

These functions return a pointer to the entry that was previously inserted into the hash with rbhash_insert(3). If no entry exists with this key, NULL is returned.

DUPLICATE ENTRIES

If an entry is inserted into the hash table with a key of an entry that already exists in the hash table, they will both be added and no error condition will exist. Any calls thereafter to rbhash_lookup(3) will return the last entry inserted with that key. rbhash_lookup_next(3) may be used after using rbhash_lookup(3) to return the previous entries with the same key in the hash table.

If you do not wish to have multiple entries with the same key, you must do a rbhash_lookup(3) prior to inserting the new entry.

SEE ALSO