C Collections

chashmap · Section 3

chmap_reset

chmap_reset - clear all entries from a hash map (type-inferred wrapper)

C Collections (libccollections, -lccollections)

#include <ccollections/chashmap.h>
 
chmap_reset(chm, new_bucket_array_size);

Type-inferred wrapper for chashmap_reset(). It takes the same arguments
and gives the same result; chashmap_reset(3) has the full contract.

chm                      Hash map to reset
new_bucket_array_size    Number of buckets after the reset; see
                         chashmap_reset(3)

The code chashmap_reset(3) gives: ccol_success, or
ccol_not_enough_memory when the resize failed and the entries are
cleared anyway.

chashmap_reset(3)