56
56
/* A search iterator state */
57
57
typedef uint32_t HASH_SEARCH_STATE;
59
#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,0,B,C,D,E,F,G,H CALLER_INFO)
60
#define hash_init2(A,B,C,D,E,F,G,H,I) _hash_init(A,B,C,D,E,F,G,H,I CALLER_INFO)
59
#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,0,B,C,D,E,F,G,H)
60
#define hash_init2(A,B,C,D,E,F,G,H,I) _hash_init(A,B,C,D,E,F,G,H,I)
61
61
bool _hash_init(HASH *hash, uint32_t growth_size,
62
62
const CHARSET_INFO * const charset,
63
63
uint32_t default_array_elements, size_t key_offset,
64
64
size_t key_length, hash_get_key get_key,
65
void (*free_element)(void*), uint32_t flags CALLER_INFO_PROTO);
65
void (*free_element)(void*), uint32_t flags);
66
66
void hash_free(HASH *tree);
67
67
void my_hash_reset(HASH *hash);
68
68
unsigned char *hash_element(HASH *hash,uint32_t idx);
81
81
#define hash_clear(H) memset((H), 0, sizeof(*(H)))
82
82
#define hash_inited(H) ((H)->array.buffer != 0)
83
83
#define hash_init_opt(A,B,C,D,E,F,G,H) \
84
(!hash_inited(A) && _hash_init(A,0,B,C,D,E,F,G, H CALLER_INFO))
84
(!hash_inited(A) && _hash_init(A,0,B,C,D,E,F,G, H))