X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilchashtable.h;h=228887775a990655d5a1c8dbfa0bd34a4eaeef8c;hb=da3a876c26b6d697ee6446ad81a8edfff1828cab;hp=6e04f6b75103d712d00835421f961b9ce64bd63e;hpb=346885ee9466a6f1d5ecc99a5401aa3043acf7c0;p=silc.git diff --git a/lib/silcutil/silchashtable.h b/lib/silcutil/silchashtable.h index 6e04f6b7..22888777 100644 --- a/lib/silcutil/silchashtable.h +++ b/lib/silcutil/silchashtable.h @@ -324,6 +324,27 @@ bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, bool silc_hash_table_find(SilcHashTable ht, void *key, void **ret_key, void **ret_context); +/****f* silcutil/SilcHashTableAPI/silc_hash_table_find_by_context + * + * SYNOPSIS + * + * bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, + * void *context, void **ret_key); + * + * DESCRIPTION + * + * Finds the entry in the hash table by the provided `key' and + * `context' as fast as possible. This is handy function when there + * can be multiple same keys in the hash table. By using this function + * the specific key with specific context can be found. Return + * TRUE if the entry with the key and context was found and FALSE + * otherwise. The function returns only the key to `ret_key' since + * the caller already knows the context. + * + ***/ +bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, + void *context, void **ret_key); + /****f* silcutil/SilcHashTableAPI/silc_hash_table_find_foreach * * SYNOPSIS