dovecot-2.0: Added CONTEXT_CALLBACK2() helper macro.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jan 31 19:11:26 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/45709a87e4b3
changeset: 10614:45709a87e4b3
user: Timo Sirainen <tss at iki.fi>
date: Sun Jan 31 19:09:44 2010 +0200
description:
Added CONTEXT_CALLBACK2() helper macro.
diffstat:
1 file changed, 5 insertions(+)
src/lib/macros.h | 5 +++++
diffs (17 lines):
diff -r 89928f671350 -r 45709a87e4b3 src/lib/macros.h
--- a/src/lib/macros.h Sun Jan 31 17:57:13 2010 +0200
+++ b/src/lib/macros.h Sun Jan 31 19:09:44 2010 +0200
@@ -146,8 +146,13 @@
# define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
({(void)(1 ? 0 : callback(context)); \
name(__VA_ARGS__, (callback_type *)callback, context); })
+# define CONTEXT_CALLBACK2(name, callback_type, callback, arg1_type, context, ...) \
+ ({(void)(1 ? 0 : callback((arg1_type)0, context)); \
+ name(__VA_ARGS__, (callback_type *)callback, context); })
#else
# define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
+ name(__VA_ARGS__, (callback_type *)callback, context)
+# define CONTEXT_CALLBACK2(name, callback_type, callback, arg1_type, context, ...) \
name(__VA_ARGS__, (callback_type *)callback, context)
#endif
More information about the dovecot-cvs
mailing list