[dovecot-cvs] dovecot/src/auth auth-request-handler.h,1.8,1.9
tss at dovecot.org
tss at dovecot.org
Fri Dec 15 18:10:53 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv2752/auth
Modified Files:
auth-request-handler.h
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-request-handler.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request-handler.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- auth-request-handler.h 15 Dec 2006 16:55:29 -0000 1.8
+++ auth-request-handler.h 15 Dec 2006 18:10:51 -0000 1.9
@@ -12,10 +12,15 @@
auth_request_callback_t *master_callback);
#ifdef CONTEXT_TYPE_SAFETY
# define auth_request_handler_create(auth, callback, context, master_callback)\
- ({(void)(1 ? 0 : callback(0, context)); \
+ ({(void)(1 ? 0 : callback((const char *)NULL, context)); \
auth_request_handler_create(auth, \
(auth_request_callback_t *)callback, context, \
master_callback); })
+#else
+# define auth_request_handler_create(auth, callback, context, master_callback)\
+ auth_request_handler_create(auth, \
+ (auth_request_callback_t *)callback, context, \
+ master_callback)
#endif
void auth_request_handler_unref(struct auth_request_handler **handler);
More information about the dovecot-cvs
mailing list