[dovecot-cvs] dovecot/src/plugins/trash trash-plugin.c,1.6,1.7

cras at dovecot.org cras at dovecot.org
Wed Jun 28 16:11:12 EEST 2006


Update of /var/lib/cvs/dovecot/src/plugins/trash
In directory talvi:/tmp/cvs-serv11200/src/plugins/trash

Modified Files:
	trash-plugin.c 
Log Message:
Array API redesigned to work using unions. It now provides type safety
without having to enable DEBUG, as long as the compiler supports typeof().
Its API changed a bit. It now allows directly accessing the array contents,
although that's not necessarily recommended. Changed existing array usage to
be type safe in a bit more places. Removed array_t completely. Also did
s/modifyable/modifiable/.



Index: trash-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/trash/trash-plugin.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- trash-plugin.c	17 Jun 2006 15:06:23 -0000	1.6
+++ trash-plugin.c	28 Jun 2006 13:11:10 -0000	1.7
@@ -16,7 +16,7 @@
 #define MAX_RETRY_COUNT 3
 
 #define TRASH_CONTEXT(obj) \
-	*((void **)array_idx_modifyable(&(obj)->quota_module_contexts, \
+	*((void **)array_idx_modifiable(&(obj)->quota_module_contexts, \
 					trash_quota_module_id))
 
 struct trash_quota_root {
@@ -46,7 +46,7 @@
 
 static pool_t config_pool;
 /* trash_boxes ordered by priority, highest first */
-static array_t ARRAY_DEFINE(trash_boxes, struct trash_mailbox);
+static ARRAY_DEFINE(trash_boxes, struct trash_mailbox);
 
 static int trash_clean_mailbox_open(struct trash_mailbox *trash)
 {
@@ -96,7 +96,7 @@
 	uint64_t size;
 	int ret = 0;
 
-	trashes = array_get_modifyable(&trash_boxes, &count);
+	trashes = array_get_modifiable(&trash_boxes, &count);
 	for (i = 0; i < count; ) {
 		/* expunge oldest mails first in all trash boxes with
 		   same priority */
@@ -251,7 +251,7 @@
 	i_stream_destroy(&input);
 	(void)close(fd);
 
-	qsort(array_get_modifyable(&trash_boxes, NULL),
+	qsort(array_get_modifiable(&trash_boxes, NULL),
 	      array_count(&trash_boxes), sizeof(struct trash_mailbox),
 	      trash_mailbox_priority_cmp);
 	return 0;



More information about the dovecot-cvs mailing list