1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #953 from dwfreed/fix-printtext.h

Use ##__VA_ARGS__ extension to allow for argument-less ...
This commit is contained in:
ailin-nemui 2018-10-05 10:48:25 +02:00 committed by GitHub
commit d815c88050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,16 +46,16 @@ void printtext_deinit(void);
printformat_module_dest(MODULE_NAME, dest, ##formatnum) printformat_module_dest(MODULE_NAME, dest, ##formatnum)
# define printformat_gui(formatnum...) \ # define printformat_gui(formatnum...) \
printformat_module_gui(MODULE_NAME, ##formatnum) printformat_module_gui(MODULE_NAME, ##formatnum)
#elif defined (_ISOC99_SOURCE) #elif __STDC_VERSION__ >= 199901L
/* C99 */ /* C99 */
# define printformat(server, target, level, formatnum, ...) \ # define printformat(server, target, level, formatnum, ...) \
printformat_module(MODULE_NAME, server, target, level, formatnum, __VA_ARGS__) printformat_module(MODULE_NAME, server, target, level, formatnum, ##__VA_ARGS__)
# define printformat_window(window, level, formatnum, ...) \ # define printformat_window(window, level, formatnum, ...) \
printformat_module_window(MODULE_NAME, window, level, formatnum, __VA_ARGS__) printformat_module_window(MODULE_NAME, window, level, formatnum, ##__VA_ARGS__)
# define printformat_dest(dest, formatnum, ...) \ # define printformat_dest(dest, formatnum, ...) \
printformat_module_dest(MODULE_NAME, dest, formatnum, __VA_ARGS__) printformat_module_dest(MODULE_NAME, dest, formatnum, ##__VA_ARGS__)
# define printformat_gui(formatnum, ...) \ # define printformat_gui(formatnum, ...) \
printformat_module_gui(MODULE_NAME, formatnum, __VA_ARGS__) printformat_module_gui(MODULE_NAME, formatnum, ##__VA_ARGS__)
#else #else
/* inline/static */ /* inline/static */
#ifdef G_CAN_INLINE #ifdef G_CAN_INLINE