[dovecot-cvs] dovecot/src/lib-settings settings.h,1.5,1.6
tss at dovecot.org
tss at dovecot.org
Fri Dec 15 18:10:59 UTC 2006
- Previous message: [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
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache-lookup.c, 1.36, 1.37 mail-cache-private.h, 1.35, 1.36 mail-hash.h, 1.12, 1.13 mail-index-private.h, 1.76, 1.77 mail-index.c, 1.247, 1.248
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-settings
In directory talvi:/tmp/cvs-serv2752/lib-settings
Modified Files:
settings.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: settings.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-settings/settings.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- settings.h 15 Dec 2006 16:55:42 -0000 1.5
+++ settings.h 15 Dec 2006 18:10:57 -0000 1.6
@@ -32,10 +32,15 @@
settings_section_callback_t *sect_callback, void *context);
#ifdef CONTEXT_TYPE_SAFETY
# define settings_read(path, section, callback, sect_callback, context) \
- ({(void)(1 ? 0 : callback(0, 0, context)); \
- (void)(1 ? 0 : sect_callback(0, 0, context, 0)); \
+ ({(void)(1 ? 0 : callback((const char *)0, (const char *)0, context)); \
+ (void)(1 ? 0 : sect_callback((const char *)0, (const char *)0, \
+ context, (const char **)0)); \
settings_read(path, section, (settings_callback_t *)callback, \
(settings_section_callback_t *)sect_callback, context); })
+#else
+# define settings_read(path, section, callback, sect_callback, context) \
+ settings_read(path, section, (settings_callback_t *)callback, \
+ (settings_section_callback_t *)sect_callback, context)
#endif
#endif
- Previous message: [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
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache-lookup.c, 1.36, 1.37 mail-cache-private.h, 1.35, 1.36 mail-hash.h, 1.12, 1.13 mail-index-private.h, 1.76, 1.77 mail-index.c, 1.247, 1.248
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list