[dovecot-cvs] dovecot/src/lib-mail mail-types.h, 1.3, 1.4 message-body-search.c, 1.27, 1.28 message-header-search.c, 1.17, 1.18

cras at dovecot.org cras at dovecot.org
Wed Jun 28 16:10:47 EEST 2006


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

Modified Files:
	mail-types.h message-body-search.c message-header-search.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: mail-types.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/mail-types.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mail-types.h	26 Dec 2004 09:12:41 -0000	1.3
+++ mail-types.h	28 Jun 2006 13:10:44 -0000	1.4
@@ -18,4 +18,6 @@
 	MODIFY_REPLACE
 };
 
+ARRAY_DEFINE_TYPE(keywords, const char *);
+
 #endif

Index: message-body-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-body-search.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- message-body-search.c	26 Feb 2006 10:05:14 -0000	1.27
+++ message-body-search.c	28 Jun 2006 13:10:44 -0000	1.28
@@ -170,7 +170,7 @@
 	key = (const unsigned char *) ctx->body_ctx->key;
 	key_len = ctx->body_ctx->key_len;
 
-	matches = buffer_get_modifyable_data(ctx->match_buf, &match_count);
+	matches = buffer_get_modifiable_data(ctx->match_buf, &match_count);
 	match_count /= sizeof(size_t);
 
 	p = buffer_get_data(block, &block_size);

Index: message-header-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-header-search.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- message-header-search.c	14 Jan 2006 18:47:35 -0000	1.17
+++ message-header-search.c	28 Jun 2006 13:10:44 -0000	1.18
@@ -126,7 +126,7 @@
 	unsigned char chr;
 	bool last_newline;
 
-	matches = buffer_get_modifyable_data(ctx->match_buf, &match_count);
+	matches = buffer_get_modifiable_data(ctx->match_buf, &match_count);
 	match_count /= sizeof(size_t);
 
 	last_newline = ctx->last_newline;



More information about the dovecot-cvs mailing list