[dovecot-cvs] dovecot/src/dict dict-server.c,1.13,1.14

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


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

Modified Files:
	dict-server.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: dict-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/dict/dict-server.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- dict-server.c	17 Jun 2006 12:25:04 -0000	1.13
+++ dict-server.c	28 Jun 2006 13:10:31 -0000	1.14
@@ -33,7 +33,7 @@
 
 	/* There are only a few transactions per client, so keeping them in
 	   array is fast enough */
-	array_t ARRAY_DEFINE(transactions, struct dict_server_transaction);
+	ARRAY_DEFINE(transactions, struct dict_server_transaction);
 };
 
 struct dict_server {
@@ -111,7 +111,7 @@
 	if (!array_is_created(&conn->transactions))
 		return NULL;
 
-	transactions = array_get_modifyable(&conn->transactions, &count);
+	transactions = array_get_modifiable(&conn->transactions, &count);
 	for (i = 0; i < count; i++) {
 		if (transactions[i].id == id)
 			return &transactions[i];



More information about the dovecot-cvs mailing list