cp_hashtable_remove(3)
| cp_hashtable(3) | libcprops - cp_hashtable | cp_hashtable(3) |
NAME
cp_hashtable_remove, cp_hashtable_remove_deep, cp_hashtable_remove_all - remove mappings from a hashtable
SYNOPSIS
#include <cprops/hashtable.h>
void *cp_hashtable_remove(cp_hashtable *table,
void *key);
int cp_hashtable_remove_deep(cp_hashtable *table, void
*key);
int cp_hashtable_remove_all(cp_hashtable *table);
DESCRIPTION
cp_hashtable_remove attempts to remove the mapping for key from hashtable table. If COLLECTION_MODE_MULTIPLE_VALUES is set all mappings for this key are removed. If COLLECTION_MODE_DEEP is set the finalization functions set at table initialization are invoked upon the key and value being removed.
cp_hashtable_remove_deep is the same as cp_hashtable_remove with the COLLECTION_MODE_DEEP bit set.
cp_hashtable_remove_all removes all mappings from the table.
RETURN VALUE
cp_hashtable_remove and cp_hashtable_remove_deep
return a pointer to the last removed value - which may no longer be valid if
the memory it points to is released by the finalization function, or
NULL if no mapping was found for key.
cp_hashtable_remove_all returns 0 on success or non-zero on locking
failure.
SEE ALSO
| OCTOBER 2005 | libcprops.0.0.3 |
