cp_hashtable

Section: libcprops - cp_hashtable (3)
Updated: OCTOBER 2005
Index Return to Main Contents
 

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

cp_hashtable_create(3), cp_hashtable_set_mode(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:01:45 GMT, May 23, 2006
SourceForge.net Logo