Skip to main content

Name

sieve_hash_first_item — Get the first item from a hash table and add a reference to it

Synopsis

#include "sieve/ecsieve.h"

| int **sieve_hash_first_item** ( | hash, |   | |   | iter, |   | |   | key, |   | |   | item); |   |

SIEVEARGS * <var class="pdparam">hash</var>; ec_hash_iter * <var class="pdparam">iter</var>; const char ** <var class="pdparam">key</var>; SIEVEARGS ** <var class="pdparam">item</var>;

Description

Get the first item from an ec_hash_table and add a reference to it.

You must call sieve_arg_delref when you are done using the item.

Parameters

hash

A pointer to the ec_hash_table of the SIEVETOKEN value of the specified SIEVEARG.

iter

The hash iterator. For more information about this data type see ec_hash_iter.

key

The key to the hash item you wish to return.

item

The value of the specified key.

Return Value

On success this function returns 1; on failure, 0.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?