]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added CONTEXT_CALLBACK2() helper macro.
authorTimo Sirainen <tss@iki.fi>
Sun, 31 Jan 2010 17:09:44 +0000 (19:09 +0200)
committerTimo Sirainen <tss@iki.fi>
Sun, 31 Jan 2010 17:09:44 +0000 (19:09 +0200)
--HG--
branch : HEAD

src/lib/macros.h

index 4ddb0b908d199cb43421a1923ad182bf177dff68..1b90ee7446a73a82a3d5cf830c4179282e79f910 100644 (file)
 #  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
 
 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)