hash_entry_s Struct Reference

The hash table structures. More...

#include <hash_table.h>


Data Fields

const char * key
size_t len
 Key string, NULL if this is an empty slot.
void * val
 Key-length; the key string does not have to be a C-style NULL terminated string; it can have arbitrary binary bytes.
hash_entry_snext
 Value associated with above key.


Detailed Description

The hash table structures.

Each hash table is identified by a hash_table_t structure. hash_table_t.table is pre-allocated for a user-controlled max size, and is initially empty. As new entries are created (using hash_enter()), the empty entries get filled. If multiple keys hash to the same entry, new entries are allocated and linked together in a linear list.

Definition at line 149 of file hash_table.h.


Field Documentation

size_t hash_entry_s::len

Key string, NULL if this is an empty slot.

NOTE that the key must not be changed once the entry has been made.

Definition at line 153 of file hash_table.h.

Referenced by hash_table_display().


The documentation for this struct was generated from the following file:
Generated on Mon Jan 24 21:36:19 2011 for SphinxBase by  doxygen 1.4.7