[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.53, 1.54 mbox-sync-update.c, 1.49, 1.50 mbox-sync.c, 1.184, 1.185

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


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

Modified Files:
	mbox-sync-parse.c mbox-sync-update.c mbox-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: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- mbox-sync-parse.c	10 Sep 2006 12:33:22 -0000	1.53
+++ mbox-sync-parse.c	10 Sep 2006 12:48:28 -0000	1.54
@@ -269,7 +269,7 @@
 	/* read keyword indexes to temporary array first */
 	t_push();
 	keyword = t_str_new(128);
-	ARRAY_CREATE(&keyword_list, pool_datastack_create(), 16);
+	t_array_init(&keyword_list, 16);
 
 	for (pos = 0; pos < hdr->full_value_len; ) {
 		if (IS_LWSP_LF(hdr->full_value[pos])) {
@@ -310,7 +310,7 @@
 	/* once we know how many keywords there are, we can allocate the array
 	   from mail_keyword_pool without wasting memory. */
 	if (array_count(&keyword_list) > 0) {
-		ARRAY_CREATE(&ctx->mail.keywords,
+		p_array_init(&ctx->mail.keywords,
 			     ctx->sync_ctx->mail_keyword_pool,
 			     array_count(&keyword_list));
 		array_append_array(&ctx->mail.keywords, &keyword_list);

Index: mbox-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-update.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mbox-sync-update.c	10 Sep 2006 12:33:22 -0000	1.49
+++ mbox-sync-update.c	10 Sep 2006 12:48:28 -0000	1.50
@@ -437,7 +437,7 @@
 		}
 	} else if (!array_is_created(&ctx->mail.keywords)) {
 		/* adding first keywords */
-		ARRAY_CREATE(&ctx->mail.keywords,
+		p_array_init(&ctx->mail.keywords,
 			     ctx->sync_ctx->mail_keyword_pool,
 			     array_count(&mail->keywords));
 		array_append_array(&ctx->mail.keywords,

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- mbox-sync.c	10 Sep 2006 12:33:22 -0000	1.184
+++ mbox-sync.c	10 Sep 2006 12:48:28 -0000	1.185
@@ -253,7 +253,7 @@
 					break;
 
 				/* adding, create the array */
-				ARRAY_CREATE(&mail->keywords,
+				p_array_init(&mail->keywords,
 					     sync_ctx->mail_keyword_pool,
 					     I_MIN(10, count - i));
 			}
@@ -462,7 +462,7 @@
 
 		/* get old keywords */
 		t_push();
-		ARRAY_CREATE(&idx_mail.keywords, pool_datastack_create(), 32);
+		t_array_init(&idx_mail.keywords, 32);
 		if (mail_index_lookup_keywords(sync_ctx->sync_view,
 					       sync_ctx->idx_seq,
 					       &idx_mail.keywords) < 0) {
@@ -1642,8 +1642,8 @@
 	/* make sure we've read the latest keywords in index */
 	(void)mail_index_get_keywords(mbox->ibox.index);
 
-	ARRAY_CREATE(&sync_ctx.mails, default_pool, 64);
-	ARRAY_CREATE(&sync_ctx.syncs, default_pool, 32);
+	i_array_init(&sync_ctx.mails, 64);
+	i_array_init(&sync_ctx.syncs, 32);
 
 	sync_ctx.flags = flags;
 	sync_ctx.delay_writes = delay_writes || sync_ctx.mbox->mbox_readonly;



More information about the dovecot-cvs mailing list