cp_hashlist

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

NAME

cp_hashlist_remove, cp_hashlist_remove_deep,
cp_hashlist_remove_by_option, cp_hashlist_remove_head,
cp_hashlist_remove_head_by_option, cp_hashlist_remove_tail,
cp_hashlist_remove_tail_by_option - remove mappings from a hashlist  

SYNOPSIS

#include <cprops/hashlist.h>

void *cp_hashlist_remove(cp_hashlist *list, void *key);
void *cp_hashlist_remove_deep(cp_hashlist *list, void *key);
void *cp_hashlist_remove_by_option(cp_hashlist *list,
                                    void *key, int mode);
void *cp_hashlist_remove_head(cp_hashlist *list);
void *cp_hashlist_remove_head_by_option(cp_hashlist *list, int mode);
void *cp_hashlist_remove_tail(cp_hashlist *list);
void *cp_hashlist_remove_tail_by_option(cp_hashlist *list, int mode);

 

DESCRIPTION

cp_hashlist_remove attempts to remove the mapping for key from hashlist list. 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_hashlist_remove_deep is the same as cp_hashlist_remove with the COLLECTION_MODE_DEEP bit set.

cp_hashlist_remove_head and cp_hashlist_remove_tail remove the first and last mappings from the list respectively. cp_hashlist_remove_head_by_option and cp_hashlist_remove_tail_by_option allow specifying a mode other than the current list mode, with the reservation that synchronization behavior is determined by the list mode and is not affected by the mode parameter.  

RETURN VALUE

cp_hashlist_remove and cp_hashlist_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.  

SEE ALSO

cp_hashlist_create(3), cp_hashlist_set_mode(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 18:37:21 GMT, December 27, 2005
SourceForge.net Logo