cyaml · Section 3
cyaml_dictionary_remove
NAME
cyaml_dictionary_remove - remove and free a key from a dictionary node
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cyaml.h> ccol_retval cyaml_dictionary_remove(cyaml map, const char *key);
DESCRIPTION
Removes the member with this key from the dictionary node map and frees its value together with everything below it. The remaining members keep their order. A cyaml_dictionary_iter cursor survives the removal of any member except the one its next step reads (the successor of the member it stands on). So a walk may remove its current member, but removing that successor invalidates the cursor. See cyaml_dictionary_first(3).
RETURN VALUE
ccol_success - the member was removed and freed. ccol_invalid_args - map is NULL, or map is not a CYAML_DICTIONARY. ccol_key_not_found - the dictionary holds no such key.
SEE ALSO
cyaml_dictionary_set(3), cyaml_dictionary_get(3), cyaml_dictionary_first(3), cyaml_list_remove(3)