[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.51, 1.52 mail-cache.c, 1.83, 1.84 mail-index-sync-ext.c, 1.20, 1.21 mail-index-sync.c, 1.75, 1.76 mail-index-transaction.c, 1.78, 1.79 mail-index-view-sync.c, 1.54, 1.55 mail-index-view.c, 1.47, 1.48 mail-index.c, 1.239, 1.240
cras at dovecot.org
cras at dovecot.org
Sun Sep 10 15:33:15 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv1034/lib-index
Modified Files:
mail-cache-transaction.c mail-cache.c mail-index-sync-ext.c
mail-index-sync.c mail-index-transaction.c
mail-index-view-sync.c mail-index-view.c mail-index.c
Log Message:
Removed type parameter from ARRAY_CREATE since it's not needed anymore.
Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mail-cache-transaction.c 28 Jun 2006 13:10:38 -0000 1.51
+++ mail-cache-transaction.c 10 Sep 2006 12:33:08 -0000 1.52
@@ -57,8 +57,7 @@
ctx->cache = view->cache;
ctx->view = view;
ctx->trans = t;
- ARRAY_CREATE(&ctx->reservations, default_pool,
- struct mail_cache_reservation, 32);
+ ARRAY_CREATE(&ctx->reservations, default_pool, 32);
if (!MAIL_CACHE_IS_UNUSABLE(ctx->cache))
ctx->cache_file_seq = ctx->cache->hdr->file_seq;
@@ -550,7 +549,7 @@
ctx->cache_data =
buffer_create_dynamic(default_pool,
MAIL_CACHE_WRITE_BUFFER);
- ARRAY_CREATE(&ctx->cache_data_seq, default_pool, uint32_t, 64);
+ ARRAY_CREATE(&ctx->cache_data_seq, default_pool, 64);
}
memset(&new_rec, 0, sizeof(new_rec));
@@ -836,7 +835,7 @@
able to ask cached data from messages that have already been
expunged. */
t_push();
- ARRAY_CREATE(&tmp_offsets, pool_datastack_create(), uint32_t, 8);
+ ARRAY_CREATE(&tmp_offsets, pool_datastack_create(), 8);
array_append(&tmp_offsets, &offset, 1);
for (;;) {
cache->hdr_copy.deleted_space += cache_rec->size;
Index: mail-cache.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- mail-cache.c 11 Jul 2006 16:02:42 -0000 1.83
+++ mail-cache.c 10 Sep 2006 12:33:08 -0000 1.84
@@ -528,7 +528,7 @@
view = i_new(struct mail_cache_view, 1);
view->cache = cache;
view->view = iview;
- ARRAY_CREATE(&view->tmp_offsets, default_pool, uint32_t, 32);
+ ARRAY_CREATE(&view->tmp_offsets, default_pool, 32);
view->cached_exists_buf =
buffer_create_dynamic(default_pool,
cache->file_fields_count + 10);
Index: mail-index-sync-ext.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-ext.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mail-index-sync-ext.c 11 Jul 2006 16:02:42 -0000 1.20
+++ mail-index-sync-ext.c 10 Sep 2006 12:33:08 -0000 1.21
@@ -26,10 +26,8 @@
memset(&eh, 0, sizeof(eh));
if (array_is_created(&ctx->expunge_handlers))
array_clear(&ctx->expunge_handlers);
- else {
- ARRAY_CREATE(&ctx->expunge_handlers, default_pool,
- struct mail_index_expunge_handler, 64);
- }
+ else
+ ARRAY_CREATE(&ctx->expunge_handlers, default_pool, 64);
rext = array_get(&ctx->view->index->extensions, &rext_count);
ext = array_get(&ctx->view->map->extensions, &ext_count);
@@ -90,8 +88,7 @@
if (array_is_created(&ctx->extra_contexts))
array_clear(&ctx->extra_contexts);
else {
- ARRAY_CREATE(&ctx->extra_contexts, default_pool,
- void *, count);
+ ARRAY_CREATE(&ctx->extra_contexts, default_pool, count);
}
/* fill the context array with NULLs */
Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- mail-index-sync.c 28 Jun 2006 13:10:38 -0000 1.75
+++ mail-index-sync.c 10 Sep 2006 12:33:09 -0000 1.76
@@ -215,8 +215,7 @@
arrays so we can easily go through all of the changes. */
keyword_count = !array_is_created(&ctx->trans->keyword_updates) ? 0 :
array_count(&ctx->trans->keyword_updates);
- ARRAY_CREATE(&ctx->sync_list, default_pool,
- struct mail_index_sync_list, keyword_count + 2);
+ ARRAY_CREATE(&ctx->sync_list, default_pool, keyword_count + 2);
if (array_is_created(&ctx->trans->expunges)) {
synclist = array_append_space(&ctx->sync_list);
Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- mail-index-transaction.c 28 Jun 2006 16:31:05 -0000 1.78
+++ mail-index-transaction.c 10 Sep 2006 12:33:09 -0000 1.79
@@ -392,8 +392,7 @@
t->log_updates = TRUE;
if (!array_is_created(&t->appends)) {
- ARRAY_CREATE(&t->appends, default_pool,
- struct mail_index_record, 32);
+ ARRAY_CREATE(&t->appends, default_pool, 32);
}
/* sequence number is visible only inside given view,
@@ -615,8 +614,7 @@
}
if (!array_is_created(&t->updates)) {
- ARRAY_CREATE(&t->updates, default_pool,
- struct mail_transaction_flag_update, 256);
+ ARRAY_CREATE(&t->updates, default_pool, 256);
array_append(&t->updates, &u, 1);
return;
}
@@ -721,10 +719,8 @@
t->log_updates = TRUE;
- if (!array_is_created(&t->ext_resizes)) {
- ARRAY_CREATE(&t->ext_resizes, default_pool,
- struct mail_transaction_ext_intro, ext_id + 2);
- }
+ if (!array_is_created(&t->ext_resizes))
+ ARRAY_CREATE(&t->ext_resizes, default_pool, ext_id + 2);
intro.hdr_size = hdr_size;
intro.record_size = record_size;
@@ -750,10 +746,8 @@
array_clear(array);
}
- if (!array_is_created(&t->ext_resets)) {
- ARRAY_CREATE(&t->ext_resets, default_pool,
- uint32_t, ext_id + 2);
- }
+ if (!array_is_created(&t->ext_resets))
+ ARRAY_CREATE(&t->ext_resets, default_pool, ext_id + 2);
array_idx_set(&t->ext_resets, ext_id, &reset_id);
}
@@ -795,10 +789,8 @@
record_size = rext->record_size;
}
- if (!array_is_created(&t->ext_rec_updates)) {
- ARRAY_CREATE(&t->ext_rec_updates, default_pool,
- ARRAY_TYPE(seq_array), ext_id + 2);
- }
+ if (!array_is_created(&t->ext_rec_updates))
+ ARRAY_CREATE(&t->ext_rec_updates, default_pool, ext_id + 2);
array = array_idx_modifiable(&t->ext_rec_updates, ext_id);
/* @UNSAFE */
@@ -888,9 +880,7 @@
if (!array_is_created(&t->keyword_updates) && keywords->count > 0) {
uint32_t max_idx = keywords->idx[keywords->count-1];
- ARRAY_CREATE(&t->keyword_updates, default_pool,
- struct mail_index_transaction_keyword_update,
- max_idx + 1);
+ ARRAY_CREATE(&t->keyword_updates, default_pool, max_idx + 1);
}
/* Update add_seq and remove_seq arrays which describe the keyword
@@ -973,8 +963,8 @@
t->no_appends = TRUE;
}
- ARRAY_CREATE(&t->mail_index_transaction_module_contexts, default_pool,
- void *, I_MIN(5, mail_index_module_id));
+ array_create(&t->mail_index_transaction_module_contexts, default_pool,
+ sizeof(void *), I_MIN(5, mail_index_module_id));
if (hook_mail_index_transaction_created != NULL)
hook_mail_index_transaction_created(t);
Index: mail-index-view-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view-sync.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- mail-index-view-sync.c 28 Jun 2006 13:10:38 -0000 1.54
+++ mail-index-view-sync.c 10 Sep 2006 12:33:09 -0000 1.55
@@ -123,7 +123,7 @@
if (view_sync_set_log_view_range(view, MAIL_TRANSACTION_EXPUNGE) < 0)
return -1;
- ARRAY_CREATE(expunges_r, default_pool, struct uid_range, 64);
+ ARRAY_CREATE(expunges_r, default_pool, 64);
while ((ret = mail_transaction_log_view_next(view->log_view,
&hdr, &data, NULL)) > 0) {
i_assert((hdr->type & MAIL_TRANSACTION_EXPUNGE) != 0);
@@ -595,10 +595,8 @@
{
struct mail_index_view_log_sync_pos *pos;
- if (!array_is_created(sync_arr)) {
- ARRAY_CREATE(sync_arr, default_pool,
- struct mail_index_view_log_sync_pos, 32);
- }
+ if (!array_is_created(sync_arr))
+ ARRAY_CREATE(sync_arr, default_pool, 32);
pos = array_append_space(sync_arr);
pos->log_file_seq = log_file_seq;
Index: mail-index-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mail-index-view.c 28 Jun 2006 16:31:05 -0000 1.47
+++ mail-index-view.c 10 Sep 2006 12:33:09 -0000 1.48
@@ -145,8 +145,7 @@
return;
}
} else {
- ARRAY_CREATE(&view->map_refs, default_pool,
- struct mail_index_map *, 4);
+ ARRAY_CREATE(&view->map_refs, default_pool, 4);
}
/* reference the given mapping. the reference is dropped when the view
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -d -r1.239 -r1.240
--- mail-index.c 23 Jul 2006 14:23:00 -0000 1.239
+++ mail-index.c 10 Sep 2006 12:33:09 -0000 1.240
@@ -34,14 +34,10 @@
index->fd = -1;
index->extension_pool = pool_alloconly_create("extension", 512);
- ARRAY_CREATE(&index->extensions, index->extension_pool,
- struct mail_index_registered_ext, 5);
-
- ARRAY_CREATE(&index->sync_lost_handlers, default_pool,
- mail_index_sync_lost_handler_t *, 4);
-
- ARRAY_CREATE(&index->mail_index_module_contexts, default_pool,
- void *, I_MIN(5, mail_index_module_id));
+ ARRAY_CREATE(&index->extensions, index->extension_pool, 5);
+ ARRAY_CREATE(&index->sync_lost_handlers, default_pool, 4);
+ array_create(&index->mail_index_module_contexts, default_pool,
+ sizeof(void *), I_MIN(5, mail_index_module_id));
index->mode = 0600;
index->gid = (gid_t)-1;
@@ -49,7 +45,7 @@
index->keywords_ext_id =
mail_index_ext_register(index, "keywords", 128, 2, 1);
index->keywords_pool = pool_alloconly_create("keywords", 512);
- ARRAY_CREATE(&index->keywords, default_pool, const char *, 16);
+ ARRAY_CREATE(&index->keywords, default_pool, 16);
index->keywords_hash =
hash_create(default_pool, index->keywords_pool, 0,
strcase_hash, (hash_cmp_callback_t *)strcasecmp);
@@ -212,10 +208,8 @@
}
}
- ARRAY_CREATE(&map->extensions, map->extension_pool,
- struct mail_index_ext, initial_count);
- ARRAY_CREATE(&map->ext_id_map, map->extension_pool,
- uint32_t, initial_count);
+ ARRAY_CREATE(&map->extensions, map->extension_pool, initial_count);
+ ARRAY_CREATE(&map->ext_id_map, map->extension_pool, initial_count);
}
uint32_t mail_index_map_lookup_ext(struct mail_index_map *map, const char *name)
@@ -470,7 +464,7 @@
/* create file -> index mapping */
if (!array_is_created(&map->keyword_idx_map)) {
ARRAY_CREATE(&map->keyword_idx_map, default_pool,
- unsigned int, kw_hdr->keywords_count);
+ kw_hdr->keywords_count);
}
#ifdef DEBUG
More information about the dovecot-cvs
mailing list