Moved the define at the top
This commit is contained in:
parent
3e5970eb11
commit
815e0d909d
16
src/log.h
16
src/log.h
@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
#define LOG_VERSION "0.1.0"
|
#define LOG_VERSION "0.1.0"
|
||||||
|
|
||||||
|
#define RXI_LOGC_PRINTF_ATTRIB(n, m)
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# define RXI_LOGC_PRINTF_ATTRIB(n, m) __attribute__((format(printf, n, m)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
const char *fmt;
|
const char *fmt;
|
||||||
@ -44,13 +52,7 @@ void log_set_quiet(bool enable);
|
|||||||
int log_add_callback(log_LogFn fn, void *udata, int level);
|
int log_add_callback(log_LogFn fn, void *udata, int level);
|
||||||
int log_add_fp(FILE *fp, int level);
|
int log_add_fp(FILE *fp, int level);
|
||||||
|
|
||||||
#define RXI_LOGC_FMT_ATTRIB(n, m)
|
|
||||||
|
|
||||||
#if defined __GNUC__
|
void log_log(int level, const char *file, int line, const char *fmt, ...) RXI_LOGC_PRINTF_ATTRIB(4, 5);
|
||||||
# define RXI_LOGC_FMT_ATTRIB(n, m) __attribute__((format(printf, n, m)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void log_log(int level, const char *file, int line, const char *fmt, ...) RXI_LOGC_FMT_ATTRIB(4, 5);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user