[dovecot-cvs] dovecot/src/plugins/fts fts-api.c, 1.1, 1.2 fts-storage.c, 1.1, 1.2

cras at dovecot.org cras at dovecot.org
Sun Sep 17 19:34:11 EEST 2006


Update of /var/lib/cvs/dovecot/src/plugins/fts
In directory talvi:/tmp/cvs-serv7150

Modified Files:
	fts-api.c fts-storage.c 
Log Message:
Fixed to use new array API.



Index: fts-api.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/fts/fts-api.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fts-api.c	17 Sep 2006 16:28:12 -0000	1.1
+++ fts-api.c	17 Sep 2006 16:34:08 -0000	1.2
@@ -8,10 +8,8 @@
 
 void fts_backend_register(const struct fts_backend *backend)
 {
-	if (!array_is_created(&backends)) {
-		ARRAY_CREATE(&backends, default_pool,
-			     const struct fts_backend *, 4);
-	}
+	if (!array_is_created(&backends))
+		i_array_init(&backends, 4);
 	array_append(&backends, &backend, 1);
 }
 

Index: fts-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/fts/fts-storage.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fts-storage.c	17 Sep 2006 16:28:12 -0000	1.1
+++ fts-storage.c	17 Sep 2006 16:34:08 -0000	1.2
@@ -51,7 +51,7 @@
 	unsigned int i, count;
 
 	range = array_get(uid_range, &count);
-	ARRAY_CREATE(seq_range, default_pool, struct seq_range, count);
+	i_array_init(seq_range, count);
 	for (i = 0; i < count; i++) {
 		if (mailbox_get_uids(box, range[i].seq1, range[i].seq2,
 				     &new_range.seq1, &new_range.seq2) < 0) {
@@ -237,7 +237,7 @@
 		if (fts_build_new(t) < 0)
 			return ctx;
 
-		ARRAY_CREATE(&uid_result, default_pool, struct seq_range, 64);
+		i_array_init(&uid_result, 64);
 		if (fts_backend_lookup(fbox->backend, args->value.str,
 				       &uid_result) < 0) {
 			/* failed, fallback to reading everything */



More information about the dovecot-cvs mailing list