Mercurial > dovecot > core-2.2
diff src/lib-index/mail-index.c @ 8573:f9166a09423a HEAD
Renamed hash_*() to hash_table_*() to avoid conflicts with OSX's strhash.h
Based on patch by Apple.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 19 Dec 2008 09:06:38 +0200 |
parents | 9ec2882243a6 |
children | b9faf4db2a9f |
line wrap: on
line diff
--- a/src/lib-index/mail-index.c Fri Dec 19 08:50:14 2008 +0200 +++ b/src/lib-index/mail-index.c Fri Dec 19 09:06:38 2008 +0200 @@ -49,8 +49,8 @@ index->keywords_pool = pool_alloconly_create("keywords", 512); i_array_init(&index->keywords, 16); index->keywords_hash = - hash_create(default_pool, index->keywords_pool, 0, - strcase_hash, (hash_cmp_callback_t *)strcasecmp); + hash_table_create(default_pool, index->keywords_pool, 0, + strcase_hash, (hash_cmp_callback_t *)strcasecmp); index->log = mail_transaction_log_alloc(index); mail_index_modseq_init(index); return index; @@ -64,7 +64,7 @@ mail_index_close(index); mail_transaction_log_free(&index->log); - hash_destroy(&index->keywords_hash); + hash_table_destroy(&index->keywords_hash); pool_unref(&index->extension_pool); pool_unref(&index->keywords_pool); @@ -219,7 +219,8 @@ /* keywords_hash keeps a name => index mapping of keywords. Keywords are never removed from it, so the index values are valid for the lifetime of the mail_index. */ - if (hash_lookup_full(index->keywords_hash, keyword, NULL, &value)) { + if (hash_table_lookup_full(index->keywords_hash, keyword, + NULL, &value)) { *idx_r = POINTER_CAST_TO(value, unsigned int); return TRUE; } @@ -242,7 +243,8 @@ keyword = keyword_dup = p_strdup(index->keywords_pool, keyword); *idx_r = array_count(&index->keywords); - hash_insert(index->keywords_hash, keyword_dup, POINTER_CAST(*idx_r)); + hash_table_insert(index->keywords_hash, + keyword_dup, POINTER_CAST(*idx_r)); array_append(&index->keywords, &keyword, 1); }