#include <hashtab.h>
Data Fields | |
hash_T | hi_hash |
Cached hash number for hi_key. More... | |
char_u * | hi_key |
Hashtable item.
Each item has a NUL terminated string key. A key can appear only once in the table.
A hash number is computed from the key for quick lookup. When the hashes of two different keys point to the same entry an algorithm is used to iterate over other entries in the table until the right one is found. To make the iteration work removed keys are different from entries where a key was never present.
Note that this does not contain a pointer to the key and another pointer to the value. Instead, it is assumed that the key is contained within the value, so that you can get a pointer to the value subtracting an offset from the pointer to the key. This reduces the size of this item by 1/3.
hash_T hashitem_S::hi_hash |
Cached hash number for hi_key.
char_u* hashitem_S::hi_key |
Item key.
Possible values mean the following: NULL : Item was never used. HI_KEY_REMOVED : Item was removed. (Any other pointer value) : Item is currently being used.