RTS API Documentation
1.10.11
|
Go to the source code of this file.
Variables | |
static const unsigned int | primes [] |
const unsigned int | prime_table_length = sizeof(primes)/sizeof(primes[0]) |
const float | max_load_factor = 0.65f |
|
static |
Definition at line 156 of file switch_hashtable.c.
References entry::destructor, switch_hashtable::entrycount, switch_hashtable::eqfn, entry::flags, freekey, entry::h, HASHTABLE_FLAG_FREE_KEY, HASHTABLE_FLAG_FREE_VALUE, index, entry::k, entry::next, SWITCH_DECLARE, switch_safe_free, switch_hashtable::table, and entry::v.
Referenced by switch_hashtable_insert_destructor(), and switch_hashtable_remove().
|
static |
Definition at line 94 of file switch_hashtable.c.
References entry::h, index, indexFor(), switch_hashtable::loadlimit, memset(), entry::next, prime_table_length, switch_hashtable::primeindex, primes, SWITCH_DECLARE, switch_safe_free, switch_hashtable::table, and switch_hashtable::tablelength.
Referenced by switch_hashtable_insert_destructor().
switch_status_t switch_create_hashtable | ( | switch_hashtable_t ** | hp, |
unsigned int | minsize, | ||
unsigned int(*)(void *) | hashf, | ||
int(*)(void *, void *) | eqf | ||
) |
Definition at line 56 of file switch_hashtable.c.
References switch_hashtable::entrycount, switch_hashtable::eqfn, entry::h, switch_frame_geometry::h, switch_hashtable::hashfn, switch_hashtable::loadlimit, memset(), prime_table_length, switch_hashtable::primeindex, primes, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_hashtable::table, and switch_hashtable::tablelength.
Referenced by switch_core_hash_init_case(), and switch_core_inthash_init().
unsigned int switch_hashtable_count | ( | switch_hashtable_t * | h | ) |
void switch_hashtable_destroy | ( | switch_hashtable_t ** | h | ) |
Definition at line 253 of file switch_hashtable.c.
References entry::destructor, entry::flags, freekey, entry::h, HASHTABLE_FLAG_FREE_KEY, HASHTABLE_FLAG_FREE_VALUE, entry::k, entry::next, switch_safe_free, and entry::v.
Referenced by switch_core_hash_destroy(), and switch_core_inthash_destroy().
switch_hashtable_iterator_t* switch_hashtable_first_iter | ( | switch_hashtable_t * | h, |
switch_hashtable_iterator_t * | it | ||
) |
Definition at line 316 of file switch_hashtable.c.
References switch_hashtable_iterator::e, entry::h, switch_hashtable_iterator::h, switch_hashtable_iterator::pos, switch_assert, switch_hashtable_next(), and switch_zmalloc.
Referenced by switch_core_hash_first_iter().
int switch_hashtable_insert_destructor | ( | switch_hashtable_t * | h, |
void * | k, | ||
void * | v, | ||
hashtable_flag_t | flags, | ||
hashtable_destructor_t | destructor | ||
) |
Definition at line 194 of file switch_hashtable.c.
References _switch_hashtable_remove(), entry::destructor, entry::flags, entry::h, hash, HASHTABLE_DUP_CHECK, hashtable_expand(), index, indexFor(), entry::k, entry::next, SWITCH_DECLARE, and entry::v.
Referenced by switch_core_hash_insert_alloc_destructor(), switch_core_hash_insert_auto_free(), switch_core_hash_insert_destructor(), switch_core_hash_insert_dup_auto_free(), switch_core_hash_insert_dup_destructor(), switch_core_hash_insert_pointer(), and switch_core_inthash_insert().
switch_hashtable_iterator_t* switch_hashtable_next | ( | switch_hashtable_iterator_t ** | iP | ) |
Definition at line 283 of file switch_hashtable.c.
References switch_hashtable_iterator::e, switch_hashtable_iterator::h, entry::next, switch_hashtable_iterator::pos, switch_hashtable::table, and switch_hashtable::tablelength.
Referenced by switch_core_hash_next(), and switch_hashtable_first_iter().
void* switch_hashtable_remove | ( | switch_hashtable_t * | h, |
void * | k | ||
) |
Definition at line 244 of file switch_hashtable.c.
References _switch_hashtable_remove(), entry::h, hash, indexFor(), entry::k, and SWITCH_DECLARE.
Referenced by switch_core_hash_delete(), and switch_core_inthash_delete().
void* switch_hashtable_search | ( | switch_hashtable_t * | h, |
void * | k | ||
) |
Definition at line 227 of file switch_hashtable.c.
References entry::h, hash, index, indexFor(), entry::k, entry::next, SWITCH_DECLARE, and entry::v.
Referenced by switch_core_hash_find(), and switch_core_inthash_find().
void switch_hashtable_this | ( | switch_hashtable_iterator_t * | i, |
const void ** | key, | ||
switch_ssize_t * | klen, | ||
void ** | val | ||
) |
Definition at line 342 of file switch_hashtable.c.
References switch_hashtable_iterator::e, entry::k, and entry::v.
Referenced by switch_core_hash_this().
void switch_hashtable_this_val | ( | switch_hashtable_iterator_t * | i, |
void * | val | ||
) |
Definition at line 335 of file switch_hashtable.c.
References switch_hashtable_iterator::e, and entry::v.
Referenced by switch_core_hash_this_val().
const float max_load_factor = 0.65f |
Definition at line 52 of file switch_hashtable.c.
Definition at line 51 of file switch_hashtable.c.
Referenced by hashtable_expand(), and switch_create_hashtable().
|
static |
Definition at line 42 of file switch_hashtable.c.
Referenced by hashtable_expand(), and switch_create_hashtable().