function lfds710_hash_a_iterate

Jump to navigation Jump to search

Source Files

    │   └───liblfds710
    │           lfds710_hash_addonly.h

Opaque Structures

struct lfds710_hash_a_element;
struct lfds710_hash_a_iterate;


int lfds710_hash_a_iterate( struct lfds710_hash_a_iterate *hai, struct lfds710_hash_a_element **hae );


struct lfds710_hash_a_iterate *hai

A pointer to an initialized struct lfds710_hash_a_iterate.

struct lfds710_hash_a_element **hae

Set to point to the next element in the iteration.

Return Value

Returns 1 on a successful iteration. Returns 0 when iteration is complete.


This function iterates over the hash elements. The underlying data structure is an array of btrees, and the function iterates over each btree, performing a smallest-to-largest walk on each btree. As such the iteration is overall unordered, but proceeds in ordered blocks. Any elements which are added to the hash during iteration may or may not be seen - it depends on whether or not they turn up 'in front' of the current position of the iterator.

See Also