[dovecot-cvs] dovecot/src/lib-auth auth-client.c, 1.14, 1.15 auth-client.h, 1.15, 1.16 auth-server-request.c, 1.27, 1.28

tss at dovecot.org tss at dovecot.org
Fri Dec 15 18:10:56 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-auth
In directory talvi:/tmp/cvs-serv2752/lib-auth

Modified Files:
	auth-client.c auth-client.h auth-server-request.c 
Log Message:
Type safe callbacks weren't as easy as I thought. Only callback(void
*context) can be handled generically. Others can be handled specially, but
only if all the parameters are pointers, otherwise eg. int parameter can be
replaced with long without compiler giving any warnings.



Index: auth-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-client.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- auth-client.c	15 Dec 2006 17:17:21 -0000	1.14
+++ auth-client.c	15 Dec 2006 18:10:54 -0000	1.15
@@ -100,7 +100,6 @@
 		client->connections != NULL;
 }
 
-#undef auth_client_set_connect_notify
 void auth_client_set_connect_notify(struct auth_client *client,
 				    auth_connect_notify_callback_t *callback,
 				    void *context)

Index: auth-client.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-client.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- auth-client.h	15 Dec 2006 17:16:26 -0000	1.15
+++ auth-client.h	15 Dec 2006 18:10:54 -0000	1.16
@@ -48,10 +48,6 @@
 void auth_client_set_connect_notify(struct auth_client *client,
 				    auth_connect_notify_callback_t *callback,
 				    void *context);
-#define auth_client_set_connect_notify(client, callback, context) \
-	CONTEXT_CALLBACK3(auth_client_set_connect_notify, \
-			  auth_connect_notify_callback_t, \
-			  callback, context, client)
 const struct auth_mech_desc *
 auth_client_get_available_mechs(struct auth_client *client,
 				unsigned int *mech_count);
@@ -73,14 +69,6 @@
 			const struct auth_request_info *request_info,
 			auth_request_callback_t *callback, void *context,
 			const char **error_r);
-#ifdef CONTEXT_TYPE_SAFETY
-#  define auth_client_request_new(client, id, request_info, \
-				  callback, context, error_r) \
-	({(void)(1 ? 0 : callback(0, 0, 0, 0, context)); \
-	  auth_client_request_new(client, id, request_info, \
-		(auth_request_callback_t *)callback, context, error_r); })
-#endif
-
 /* Continue authentication. Call when
    reply->result == AUTH_CLIENT_REQUEST_CONTINUE */
 void auth_client_request_continue(struct auth_request *request,

Index: auth-server-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-server-request.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- auth-server-request.c	15 Dec 2006 16:55:35 -0000	1.27
+++ auth-server-request.c	15 Dec 2006 18:10:54 -0000	1.28
@@ -311,7 +311,6 @@
 	hash_iterate_deinit(iter);
 }
 
-#undef auth_client_request_new
 struct auth_request *
 auth_client_request_new(struct auth_client *client, struct auth_connect_id *id,
 			const struct auth_request_info *request_info,



More information about the dovecot-cvs mailing list