[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

cras at dovecot.org cras at dovecot.org
Sun Sep 10 15:48:29 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv24049/lib-storage/index/maildir

Modified Files:
	maildir-keywords.c maildir-storage.c maildir-sync.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: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- maildir-keywords.c	10 Sep 2006 12:33:21 -0000	1.8
+++ maildir-keywords.c	10 Sep 2006 12:48:26 -0000	1.9
@@ -53,7 +53,7 @@
 	mk->path = i_strconcat(mbox->control_dir,
 			       "/" MAILDIR_KEYWORDS_NAME, NULL);
 	mk->pool = pool_alloconly_create("maildir keywords", 256);
-	ARRAY_CREATE(&mk->list, default_pool, MAILDIR_MAX_KEYWORDS);
+	i_array_init(&mk->list, MAILDIR_MAX_KEYWORDS);
 	mk->hash = hash_create(default_pool, mk->pool, 0,
 			       strcase_hash, (hash_cmp_callback_t *)strcasecmp);
 	return mk;
@@ -317,7 +317,7 @@
 	ctx->mk = mk;
 	ctx->index = index;
 	ctx->keywords = mail_index_get_keywords(index);
-	ARRAY_CREATE(&ctx->idx_to_chr, default_pool, MAILDIR_MAX_KEYWORDS);
+	i_array_init(&ctx->idx_to_chr, MAILDIR_MAX_KEYWORDS);
 	return ctx;
 }
 

Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- maildir-storage.c	10 Sep 2006 12:33:21 -0000	1.128
+++ maildir-storage.c	10 Sep 2006 12:48:26 -0000	1.129
@@ -799,7 +799,7 @@
 	   is being modified. this doesn't protect against modifications by
 	   other processes though. */
 	pool = pool_alloconly_create("Maildir subfolders list", 1024);
-	ARRAY_CREATE(&names_arr, default_pool, 64);
+	i_array_init(&names_arr, 64);
 	ctx = maildir_mailbox_list_init(&storage->storage, oldname,
 					MAILDIR_FS_SEP_S"*",
 					MAILBOX_LIST_FAST_FLAGS);

Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- maildir-sync.c	10 Sep 2006 12:33:21 -0000	1.81
+++ maildir-sync.c	10 Sep 2006 12:48:26 -0000	1.82
@@ -412,7 +412,7 @@
 	fname++;
 	dir = t_strdup_until(path, fname);
 
-	ARRAY_CREATE(&keywords, pool_datastack_create(), 16);
+	t_array_init(&keywords, 16);
 	(void)maildir_filename_get_flags(ctx->keywords_sync_ctx,
 					 fname, &flags, &keywords);
 	flags8 = flags;
@@ -583,7 +583,7 @@
 	if (ret <= 0)
 		return ret;
 
-	ARRAY_CREATE(&ctx->sync_recs, pool_datastack_create(), 32);
+	t_array_init(&ctx->sync_recs, 32);
 	do {
 		if (maildir_sync_record(ctx, &sync_rec) < 0)
 			return -1;
@@ -963,9 +963,8 @@
 		mail_index_transaction_begin(sync_ctx->view, FALSE, TRUE);
 
 	seq = 0;
-	ARRAY_CREATE(&keywords, pool_datastack_create(), MAILDIR_MAX_KEYWORDS);
-	ARRAY_CREATE(&idx_keywords, pool_datastack_create(),
-		     MAILDIR_MAX_KEYWORDS);
+	t_array_init(&keywords, MAILDIR_MAX_KEYWORDS);
+	t_array_init(&idx_keywords, MAILDIR_MAX_KEYWORDS);
 	iter = maildir_uidlist_iter_init(mbox->uidlist);
 	while (maildir_uidlist_iter_next(iter, &uid, &uflags, &filename)) {
 		maildir_filename_get_flags(sync_ctx->keywords_sync_ctx,



More information about the dovecot-cvs mailing list