mirror of https://github.com/mpv-player/mpv
modifications to use variable number of arguments in #define with GCC
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1569 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b824ef36e2
commit
4e876e1d56
18
mp_msg.h
18
mp_msg.h
|
@ -47,11 +47,23 @@ extern int verbose; // defined in mplayer.c
|
|||
void mp_msg_init(int verbose);
|
||||
void mp_msg_c( int x, const char *format, ... );
|
||||
|
||||
#define mp_msg(mod,lev,...) mp_msg_c((mod<<8)|lev,__VA_ARGS__)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define mp_msg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args )
|
||||
|
||||
#ifdef MP_DEBUG
|
||||
#define mp_dbg(mod,lev,...) mp_msg_c((mod<<8)|lev,__VA_ARGS__)
|
||||
#define mp_dbg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args )
|
||||
#else
|
||||
// these messages are only usefull for developers, disable them
|
||||
#define mp_dbg(mod,lev,...)
|
||||
#define mp_dbg(mod,lev, args... )
|
||||
#endif
|
||||
#else // not GNU C
|
||||
#define mp_msg(mod,lev, ... ) mp_msg_c((mod<<8)|lev, __VA_ARGS__)
|
||||
|
||||
#ifdef MP_DEBUG
|
||||
#define mp_dbg(mod,lev, ... ) mp_msg_c((mod<<8)|lev, __VA_ARGS__)
|
||||
#else
|
||||
// these messages are only usefull for developers, disable them
|
||||
#define mp_dbg(mod,lev, ... )
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue