git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-11-05 00:20:30 +00:00
parent 71f94e0ee5
commit c217d45cf0
11 changed files with 114 additions and 33 deletions

View File

@@ -41,14 +41,14 @@ struct switch_hash {
Hash table;
};
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool)
SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(switch_hash_t **hash, switch_memory_pool_t *pool, switch_bool_t case_sensitive)
{
switch_hash_t *newhash;
newhash = switch_core_alloc(pool, sizeof(*newhash));
switch_assert(newhash);
sqlite3HashInit(&newhash->table, SQLITE_HASH_BINARY, 1);
sqlite3HashInit(&newhash->table, case_sensitive ? SQLITE_HASH_BINARY : SQLITE_HASH_STRING, 1);
*hash = newhash;
return SWITCH_STATUS_SUCCESS;