[dovecot-cvs] dovecot/src/lib array.h, 1.16, 1.17 ioloop-epoll.c, 1.15, 1.16 ioloop-kqueue.c, 1.11, 1.12 module-dir.c, 1.21, 1.22 seq-range-array.c, 1.6, 1.7
cras at dovecot.org
cras at dovecot.org
Sun Sep 10 15:33:10 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv1034/lib
Modified Files:
array.h ioloop-epoll.c ioloop-kqueue.c module-dir.c
seq-range-array.c
Log Message:
Removed type parameter from ARRAY_CREATE since it's not needed anymore.
Index: array.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/array.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- array.h 28 Jun 2006 15:36:42 -0000 1.16
+++ array.h 10 Sep 2006 12:33:07 -0000 1.17
@@ -13,8 +13,7 @@
...
};
- ARRAY_CREATE(&foo->bars, default_pool, struct bar, 10);
- ARRAY_CREATE(&foo->bars, default_pool, struct baz, 10); // compiler warning
+ ARRAY_CREATE(&foo->bars, default_pool, 10);
struct bar *bar = array_idx(&foo->bars, 5);
struct baz *baz = array_idx(&foo->bars, 5); // compiler warning
@@ -33,10 +32,8 @@
#include "array-decl.h"
#include "buffer.h"
-#define ARRAY_CREATE(array, pool, array_type, init_count) STMT_START { \
- array_type const *_array_tmp = (array)->v; _array_tmp = NULL; \
- array_create(array, pool, sizeof(array_type), init_count); \
- } STMT_END
+#define ARRAY_CREATE(array, pool, init_count) \
+ array_create(array, pool, sizeof(*(array)->v), init_count);
#ifdef __GNUC__
# define ARRAY_TYPE_CAST_CONST(array) \
@@ -44,8 +41,9 @@
# define ARRAY_TYPE_CAST_MODIFIABLE(array) \
(typeof((array)->v_modifiable))
# define ARRAY_TYPE_CHECK(array, data) \
- typeof((array)->v_modifiable) __tmp_array_data2 __attr_unused__ = \
- (typeof(const typeof(typeof(*(data)) *)))NULL;
+ typeof(const typeof(*(array)->v_modifiable) *) \
+ __tmp_array_data2 __attr_unused__ = \
+ (typeof(const typeof(typeof(*(data)) *)))NULL;
#else
# define ARRAY_TYPE_CAST_CONST(array)
# define ARRAY_TYPE_CAST_MODIFIABLE(array)
Index: ioloop-epoll.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-epoll.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ioloop-epoll.c 16 Aug 2006 21:33:40 -0000 1.15
+++ ioloop-epoll.c 10 Sep 2006 12:33:07 -0000 1.16
@@ -32,10 +32,8 @@
ioloop->handler_context = ctx =
p_new(ioloop->pool, struct ioloop_handler_context, 1);
- ARRAY_CREATE(&ctx->events, ioloop->pool, struct epoll_event,
- IOLOOP_INITIAL_FD_COUNT);
- ARRAY_CREATE(&ctx->fd_index, ioloop->pool,
- struct io_list *, IOLOOP_INITIAL_FD_COUNT);
+ ARRAY_CREATE(&ctx->events, ioloop->pool, IOLOOP_INITIAL_FD_COUNT);
+ ARRAY_CREATE(&ctx->fd_index, ioloop->pool, IOLOOP_INITIAL_FD_COUNT);
ctx->epfd = epoll_create(IOLOOP_INITIAL_FD_COUNT);
if (ctx->epfd < 0)
Index: ioloop-kqueue.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-kqueue.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ioloop-kqueue.c 17 Aug 2006 18:52:58 -0000 1.11
+++ ioloop-kqueue.c 10 Sep 2006 12:33:07 -0000 1.12
@@ -42,8 +42,7 @@
i_fatal("kqueue() in io_loop_handler_init() failed: %m");
fd_close_on_exec(ctx->kq, TRUE);
- ARRAY_CREATE(&ctx->events, ioloop->pool, struct kevent,
- IOLOOP_INITIAL_FD_COUNT);
+ ARRAY_CREATE(&ctx->events, ioloop->pool, IOLOOP_INITIAL_FD_COUNT);
}
void io_loop_handler_deinit(struct ioloop *ioloop)
Index: module-dir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- module-dir.c 28 Jun 2006 13:10:33 -0000 1.21
+++ module-dir.c 10 Sep 2006 12:33:07 -0000 1.22
@@ -178,7 +178,7 @@
}
pool = pool_alloconly_create("module loader", 1024);
- ARRAY_CREATE(&names, pool, const char *, 32);
+ ARRAY_CREATE(&names, pool, 32);
modules = NULL;
while ((d = readdir(dirp)) != NULL) {
Index: seq-range-array.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- seq-range-array.c 28 Jun 2006 13:10:33 -0000 1.6
+++ seq-range-array.c 10 Sep 2006 12:33:07 -0000 1.7
@@ -40,7 +40,7 @@
value.seq1 = value.seq2 = seq;
if (!array_is_created(array))
- ARRAY_CREATE(array, default_pool, struct seq_range, init_count);
+ ARRAY_CREATE(array, default_pool, init_count);
data = array_get_modifiable(array, &count);
if (count == 0) {
More information about the dovecot-cvs
mailing list