echash_delete_all

March 26, 2020 Contributors

Name

echash_delete_all — This function removes all entries from a hash table and calls the specified keyfree and datafree functions

Synopsis

#include "echash.h"

| void **echash_delete_all** ( | ht, |   |
|   | keyfree, |   |
|   | datafree); |   |

ec_hash_table * <var class="pdparam">ht</var>;
ECHashFreeFunc <var class="pdparam">keyfree</var>;
ECHashFreeFunc <var class="pdparam">datafree</var>;

Description

This function removes all entries from a hash table and calls the specified keyfree and datafree functions.

Parameters

ht

The hash table.

keyfree

A pointer to the hash table keys function.

datafree

A pointer to the hash table data function.

Note

The keyfree and datafree functions are optional. If they do not exist, no function is invoked when data or keys are freed.

Return Values

This function returns void.

Threading

It is legal to call this function in any thread.

The hash table data structure is not thread safe; any simultaneous access needs to be coordinated by the API consumer.

See Also

“ec_hash_table”, echash_delete_item and echash_create