Skip to main content

Name

echash_retrieve — Retrieve the data associated with the specified key

Synopsis

#include "echash.h"

| int **echash_retrieve(** ( | h, |   | |   | k, |   | |   | klen, |   | |   | data); |   |

ec_hash_table * <var class="pdparam">h</var>; const char * <var class="pdparam">k</var>; int <var class="pdparam">klen</var>; void ** <var class="pdparam">data</var>;

Description

Retrieve a pointer to the data associated with the specified key.

Parameters

h

The hash table

k

The key.

klen

The length of the key k.

data

A pointer to the pointer where the retreived data will be found.

Return Values

This function returns 1 on success and 0 on failure. After successful execution the data is found at *data.

Warning

When a key or value is returned, the memory is owned by the hash table. Your memory can become invalid if something else removes an entry from the table after you have queried it.

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

Was this page helpful?