pl_hashtablelookup.rst (886B)
1 PL_HashTableLookup 2 ================== 3 4 Looks up the entry with the specified key and return its value. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <plhash.h> 13 14 void *PL_HashTableLookup( 15 PLHashTable *ht, 16 const void *key); 17 18 19 Parameters 20 ~~~~~~~~~~ 21 22 The function has the following parameters: 23 24 ``ht`` 25 A pointer to the hash table in which to look up the entry specified 26 by ``key``. 27 ``key`` 28 A pointer to the key for the entry to look up. 29 30 31 Returns 32 ~~~~~~~ 33 34 The value of the entry with the specified key, or ``NULL`` if there is 35 no such entry. 36 37 38 Description 39 ----------- 40 41 If there is no entry with the specified key, :ref:`PL_HashTableLookup` 42 returns ``NULL``. This means that one cannot tell whether a ``NULL`` 43 return value means the entry does not exist or the value of the entry is 44 ``NULL``. Keep this ambiguity in mind if you want to store ``NULL`` 45 values in a hash table.