change from sqlite hash to newly added one

This commit is contained in:
Anthony Minessale
2014-03-09 00:37:09 +05:00
parent 32cce8027e
commit 804ef7709d
83 changed files with 1868 additions and 835 deletions
+3 -3
View File
@@ -186,7 +186,7 @@ SWITCH_DECLARE(char *) switch_copy_string(_Out_z_cap_(dst_size)
* progress at the same time.
*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t *ht);
SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_first(switch_memory_pool_t *p, switch_hash_t *ht);
/**
* Continue iterating over the entries in a hash table.
@@ -194,7 +194,7 @@ SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p,
* @return a pointer to the updated iteration state. NULL if there are no more
* entries.
*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht);
SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_next(switch_hash_index_t *ht);
/**
* Get the current entry's details from the iteration state.
@@ -205,7 +205,7 @@ SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht);
* @remark The return pointers should point to a variable that will be set to the
* corresponding data, or they may be NULL if the data isn't interesting.
*/
SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val);
SWITCH_DECLARE(void) switch_core_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val);
+3 -26
View File
@@ -1350,9 +1350,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(_In_ switch_core_s
\param pool the pool to use for the new hash
\return SWITCH_STATUS_SUCCESS if the hash is created
*/
SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t **hash, _In_ switch_memory_pool_t *pool, switch_bool_t case_sensitive);
#define switch_core_hash_init(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_TRUE)
#define switch_core_hash_init_nocase(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_FALSE)
SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t **hash, switch_bool_t case_sensitive);
#define switch_core_hash_init(_hash) switch_core_hash_init_case(_hash, SWITCH_TRUE)
#define switch_core_hash_init_nocase(_hash) switch_core_hash_init_case(_hash, SWITCH_FALSE)
@@ -1479,30 +1479,7 @@ SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_next(_In_ switch_hash_ind
SWITCH_DECLARE(void) switch_core_hash_this(_In_ switch_hash_index_t *hi, _Out_opt_ptrdiff_cap_(klen)
const void **key, _Out_opt_ switch_ssize_t *klen, _Out_ void **val);
/*!
\brief DEPRECATED in favor of switch_core_hash_first(). Gets the first element of a hashtable.
\param deprecate_me [deprecated] NULL
\param hash the hashtable to use
\return The element, or NULL if it wasn't found
*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(char *deprecate_me, _In_ switch_hash_t *hash);
/*!
\brief DEPRECATED in favor of switch_core_hash_next(). Gets the next element of a hashtable.
\param hi The current element
\return The next element, or NULL if there are no more
*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(_In_ switch_hash_index_t *hi);
/*!
\brief DEPRECATED in favor of switch_core_hash_this(). Gets the key and value of the current hash element.
\param hi The current element
\param key [out] the key
\param klen [out] the key's size
\param val [out] the value
*/
SWITCH_DECLARE(void) switch_hash_this(_In_ switch_hash_index_t *hi, _Out_opt_ptrdiff_cap_(klen)
const void **key, _Out_opt_ switch_ssize_t *klen, _Out_ void **val);
///\}
+4 -3
View File
@@ -2239,9 +2239,10 @@ typedef switch_xml_t(*switch_xml_search_function_t) (const char *section,
const char *tag_name, const char *key_name, const char *key_value, switch_event_t *params,
void *user_data);
typedef struct switch_hash switch_hash_t;
struct HashElem;
typedef struct HashElem switch_hash_index_t;
struct switch_hashtable;
struct switch_hashtable_iterator;
typedef struct switch_hashtable switch_hash_t;
typedef struct switch_hashtable_iterator switch_hash_index_t;
struct switch_network_list;
typedef struct switch_network_list switch_network_list_t;