tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pl_hashtableremove.rst (903B)


      1 PL_HashTableRemove
      2 ==================
      3 
      4 Removes the entry with the specified key from the hash table.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <plhash.h>
     13 
     14   PRBool PL_HashTableRemove(
     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 from which to remove the entry.
     26 ``key``
     27   A pointer to the key for the entry to be removed.
     28 
     29 
     30 Description
     31 -----------
     32 
     33 If there is no entry in the table with the specified key,
     34 :ref:`PL_HashTableRemove` returns ``PR_FALSE``. If the entry exists,
     35 :ref:`PL_HashTableRemove` removes the entry from the table, invokes
     36 ``freeEntry`` with the ``HT_FREE_ENTRY`` flag to frees the entry, and
     37 returns ``PR_TRUE``.
     38 
     39 If the table is underloaded, :ref:`PL_HashTableRemove` also shrinks the
     40 number of buckets by half.
     41 
     42 
     43 Remark
     44 ------
     45 
     46 This function should return :ref:`PRStatus`.