[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-keywords.c, 1.5, 1.6 dbox-save.c, 1.19, 1.20 dbox-sync-expunge.c, 1.20, 1.21 dbox-sync-full.c, 1.9, 1.10 dbox-sync.c, 1.22, 1.23 dbox-uidlist.c, 1.39, 1.40
cras at dovecot.org
cras at dovecot.org
Sun Sep 10 15:48:28 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c, 1.67, 1.68 index-mail.c, 1.106, 1.107 index-sort.c, 1.14, 1.15
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.8, 1.9 maildir-storage.c, 1.128, 1.129 maildir-sync.c, 1.81, 1.82
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv24049/lib-storage/index/dbox
Modified Files:
dbox-keywords.c dbox-save.c dbox-sync-expunge.c
dbox-sync-full.c dbox-sync.c dbox-uidlist.c
Log Message:
Replaced ARRAY_CREATE() macro with [ipt]_array_init() macros. The macro
has no side effects so it might as well be lowercased.
Index: dbox-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-keywords.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dbox-keywords.c 10 Sep 2006 12:33:20 -0000 1.5
+++ dbox-keywords.c 10 Sep 2006 12:48:26 -0000 1.6
@@ -32,10 +32,8 @@
array_clear(&file->idx_file_keywords);
array_clear(&file->file_idx_keywords);
} else {
- ARRAY_CREATE(&file->idx_file_keywords, default_pool,
- file->keyword_count);
- ARRAY_CREATE(&file->file_idx_keywords, default_pool,
- file->keyword_count);
+ i_array_init(&file->idx_file_keywords, file->keyword_count);
+ i_array_init(&file->file_idx_keywords, file->keyword_count);
}
/* currently we assume that all extra space at the end of header
Index: dbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-save.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- dbox-save.c 10 Sep 2006 12:33:20 -0000 1.19
+++ dbox-save.c 10 Sep 2006 12:48:26 -0000 1.20
@@ -51,7 +51,7 @@
/* Get a list of all new keywords. Using seq_range is the easiest
way to do this and should be pretty fast too. */
t_push();
- ARRAY_CREATE(&new_keywords, pool_datastack_create(), 16);
+ t_array_init(&new_keywords, 16);
for (i = 0; i < keywords->count; i++) {
/* check if it's already in the file */
if (dbox_file_lookup_keyword(ctx->mbox, ctx->file,
Index: dbox-sync-expunge.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-expunge.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- dbox-sync-expunge.c 10 Sep 2006 12:33:20 -0000 1.20
+++ dbox-sync-expunge.c 10 Sep 2006 12:48:26 -0000 1.21
@@ -148,8 +148,7 @@
lock_path = file_dotlock_get_lock_path(dotlock);
memset(&dest_entry, 0, sizeof(dest_entry));
- ARRAY_CREATE(&dest_entry.uid_list, pool_datastack_create(),
- array_count(&orig_entry->uid_list));
+ t_array_init(&dest_entry.uid_list, array_count(&orig_entry->uid_list));
dest_entry.file_seq = file_seq;
/* write file header */
Index: dbox-sync-full.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-full.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dbox-sync-full.c 10 Sep 2006 12:33:20 -0000 1.9
+++ dbox-sync-full.c 10 Sep 2006 12:48:26 -0000 1.10
@@ -88,8 +88,7 @@
mail_index_update_flags(ctx->trans, seq, MODIFY_REPLACE, flags);
t_push();
- ARRAY_CREATE(&keywords_arr, pool_datastack_create(),
- mbox->file->keyword_count);
+ t_array_init(&keywords_arr, mbox->file->keyword_count);
if (dbox_mail_get_keywords(mbox, mbox->file, &keywords_arr) < 0) {
t_pop();
return -1;
@@ -130,7 +129,7 @@
memset(&entry, 0, sizeof(entry));
entry.file_seq = file_seq;
- ARRAY_CREATE(&entry.uid_list, pool_datastack_create(), 64);
+ t_array_init(&entry.uid_list, 64);
if (mbox->file->seeked_mail_header.expunged != '0') {
/* first mail expunged */
@@ -214,7 +213,7 @@
ctx->mail_index_next_uid = hdr->next_uid;
dbox_uidlist_sync_from_scratch(ctx->uidlist_sync_ctx);
- ARRAY_CREATE(&ctx->exists, default_pool, 128);
+ i_array_init(&ctx->exists, 128);
while ((dp = readdir(dirp)) != NULL) {
if (strncmp(dp->d_name, DBOX_MAIL_FILE_PREFIX,
Index: dbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dbox-sync.c 10 Sep 2006 12:33:20 -0000 1.22
+++ dbox-sync.c 10 Sep 2006 12:48:26 -0000 1.23
@@ -64,7 +64,7 @@
if (entry == NULL) {
entry = p_new(ctx->pool, struct dbox_sync_file_entry, 1);
entry->file_seq = file_seq;
- ARRAY_CREATE(&entry->sync_recs, ctx->pool, 3);
+ p_array_init(&entry->sync_recs, ctx->pool, 3);
hash_insert(ctx->syncs, POINTER_CAST(file_seq), entry);
}
@@ -327,7 +327,7 @@
/* Get a list of all new keywords. Using seq_range is the easiest
way to do this and should be pretty fast too. */
t_push();
- ARRAY_CREATE(&keywords, pool_datastack_create(), 16);
+ t_array_init(&keywords, 16);
sync_recs = array_get(&entry->sync_recs, &count);
for (; i < count; i++) {
if (sync_recs[i].type != MAIL_INDEX_SYNC_TYPE_KEYWORD_ADD)
@@ -422,7 +422,7 @@
/* read all changes and sort them to file_seq order */
ctx->pool = pool_alloconly_create("dbox sync pool", 10240);
ctx->syncs = hash_create(default_pool, ctx->pool, 0, NULL, NULL);
- ARRAY_CREATE(&ctx->added_file_seqs, default_pool, 64);
+ i_array_init(&ctx->added_file_seqs, 64);
for (;;) {
ret = mail_index_sync_next(ctx->index_sync_ctx, &sync_rec);
if (ret <= 0) {
Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- dbox-uidlist.c 10 Sep 2006 12:33:20 -0000 1.39
+++ dbox-uidlist.c 10 Sep 2006 12:48:26 -0000 1.40
@@ -122,7 +122,7 @@
uidlist->path =
i_strconcat(mbox->path, "/"DBOX_MAILDIR_NAME"/"
DBOX_UIDLIST_FILENAME, NULL);
- ARRAY_CREATE(&uidlist->entries, default_pool, 64);
+ i_array_init(&uidlist->entries, 64);
return uidlist;
}
@@ -242,7 +242,7 @@
/* <uid list> <file seq> [<last write timestamp> <file size>] */
t_push();
entry = t_new(struct dbox_uidlist_entry, 1);
- ARRAY_CREATE(&entry->uid_list, uidlist->entry_pool, 8);
+ p_array_init(&entry->uid_list, uidlist->entry_pool, 8);
/* get uid list */
range.seq1 = range.seq2 = 0;
@@ -552,7 +552,7 @@
ctx->uidlist = uidlist;
ctx->min_usable_timestamp =
get_min_timestamp(uidlist->mbox->rotate_days);
- ARRAY_CREATE(&ctx->files, pool, 16);
+ p_array_init(&ctx->files, pool, 16);
return ctx;
}
@@ -1168,7 +1168,7 @@
save_file->dotlock = dotlock;
save_file->dev = st.st_dev;
save_file->ino = st.st_ino;
- ARRAY_CREATE(&save_file->seqs, ctx->pool, 8);
+ p_array_init(&save_file->seqs, ctx->pool, 8);
array_append(&ctx->files, &save_file, 1);
*file_r = file;
@@ -1330,7 +1330,7 @@
struct dbox_uidlist_entry, 1);
*new_entry = *entry;
- ARRAY_CREATE(&new_entry->uid_list, ctx->uidlist->entry_pool,
+ p_array_init(&new_entry->uid_list, ctx->uidlist->entry_pool,
array_count(&entry->uid_list) + 1);
array_append_array(&new_entry->uid_list, &entry->uid_list);
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c, 1.67, 1.68 index-mail.c, 1.106, 1.107 index-sort.c, 1.14, 1.15
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.8, 1.9 maildir-storage.c, 1.128, 1.129 maildir-sync.c, 1.81, 1.82
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list