[dovecot-cvs]
dovecot/src/imap client.h, 1.36, 1.37 cmd-list.c, 1.51,
1.52 commands-util.c, 1.48, 1.49 commands-util.h, 1.25,
1.26 commands.c, 1.16, 1.17 imap-fetch.c, 1.43,
1.44 imap-fetch.h, 1.18, 1.19
cras at dovecot.org
cras at dovecot.org
Wed Jun 28 16:10:35 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv11200/src/imap
Modified Files:
client.h cmd-list.c commands-util.c commands-util.h commands.c
imap-fetch.c imap-fetch.h
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: client.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/client.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- client.h 6 Mar 2006 20:34:43 -0000 1.36
+++ client.h 28 Jun 2006 13:10:32 -0000 1.37
@@ -11,7 +11,7 @@
struct mailbox_keywords {
pool_t pool; /* will be p_clear()ed when changed */
- array_t ARRAY_DEFINE(keywords, const char *);
+ ARRAY_DEFINE(keywords, const char *);
};
struct client_command_context {
Index: cmd-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-list.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- cmd-list.c 14 Jan 2006 18:47:21 -0000 1.51
+++ cmd-list.c 28 Jun 2006 13:10:32 -0000 1.52
@@ -127,7 +127,7 @@
str_append(name_str, list->name);
if (ctx->ns->sep != ctx->ns->real_sep) {
- char *p = str_c_modifyable(name_str);
+ char *p = str_c_modifiable(name_str);
for (; *p != '\0'; p++) {
if (*p == ctx->ns->real_sep)
*p = ctx->ns->sep;
Index: commands-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/commands-util.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- commands-util.c 17 Jun 2006 14:02:45 -0000 1.48
+++ commands-util.c 28 Jun 2006 13:10:32 -0000 1.49
@@ -246,9 +246,8 @@
return TRUE;
}
-static const char *get_keywords_string(const array_t *keywords)
+static const char *get_keywords_string(const ARRAY_TYPE(keywords) *keywords)
{
- ARRAY_SET_TYPE(keywords, const char *);
string_t *str;
const char *const *names;
unsigned int i, count;
@@ -268,7 +267,7 @@
#define SYSTEM_FLAGS "\\Answered \\Flagged \\Deleted \\Seen \\Draft"
void client_send_mailbox_flags(struct client *client, struct mailbox *box,
- const array_t *keywords)
+ const ARRAY_TYPE(keywords) *keywords)
{
const char *str;
@@ -288,9 +287,8 @@
}
bool client_save_keywords(struct mailbox_keywords *dest,
- const array_t *keywords)
+ const ARRAY_TYPE(keywords) *keywords)
{
- ARRAY_SET_TYPE(keywords, const char *);
const char *const *names, *const *old_names;
unsigned int i, count, old_count;
bool changed;
Index: commands-util.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/commands-util.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- commands-util.h 13 Jan 2006 20:25:59 -0000 1.25
+++ commands-util.h 28 Jun 2006 13:10:32 -0000 1.26
@@ -44,12 +44,12 @@
/* Send FLAGS + PERMANENTFLAGS to client. */
void client_send_mailbox_flags(struct client *client, struct mailbox *box,
- const array_t *keywords);
+ const ARRAY_TYPE(keywords) *keywords);
/* Copy keywords into dest. dest must have been initialized. Returns TRUE if
keywords changed. */
bool client_save_keywords(struct mailbox_keywords *dest,
- const array_t *keywords);
+ const ARRAY_TYPE(keywords) *keywords);
bool mailbox_equals(struct mailbox *box1, struct mail_storage *storage2,
const char *name2);
Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/commands.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- commands.c 8 Jun 2006 16:54:10 -0000 1.16
+++ commands.c 28 Jun 2006 13:10:32 -0000 1.17
@@ -118,7 +118,7 @@
void *base;
size_t size;
- base = buffer_get_modifyable_data(cmdbuf, &size);
+ base = buffer_get_modifiable_data(cmdbuf, &size);
size /= sizeof(struct command);
if (cmdbuf_unsorted) {
Index: imap-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- imap-fetch.c 26 Feb 2006 11:24:35 -0000 1.43
+++ imap-fetch.c 28 Jun 2006 13:10:32 -0000 1.44
@@ -35,7 +35,7 @@
fetch_handlers = buffer_create_dynamic(default_pool, 128);
buffer_append(fetch_handlers, handlers, sizeof(*handlers) * count);
- data = buffer_get_modifyable_data(fetch_handlers, &size);
+ data = buffer_get_modifiable_data(fetch_handlers, &size);
qsort(data, size / sizeof(*handlers), sizeof(*handlers),
imap_fetch_handler_cmp);
}
Index: imap-fetch.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- imap-fetch.h 26 Feb 2006 11:24:35 -0000 1.18
+++ imap-fetch.h 28 Jun 2006 13:10:32 -0000 1.19
@@ -37,7 +37,7 @@
buffer_t *all_headers_buf;
struct mailbox_header_lookup_ctx *all_headers_ctx;
- array_t ARRAY_DEFINE(handlers, struct imap_fetch_context_handler);
+ ARRAY_DEFINE(handlers, struct imap_fetch_context_handler);
unsigned int buffered_handlers_count;
struct mail *cur_mail;
More information about the dovecot-cvs
mailing list