mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-28 20:45:12 +00:00
Modify debug macro to use appropriate global instance
This commit is contained in:
parent
147119afee
commit
4cdb3900d8
@ -91,7 +91,7 @@ extern const unsigned char raw_header[RAW_HDR_LEN];
|
|||||||
fprintf(stderr, __VA_ARGS__);
|
fprintf(stderr, __VA_ARGS__);
|
||||||
|
|
||||||
#define DEBUG(level, ...) \
|
#define DEBUG(level, ...) \
|
||||||
if (debug >= level) {\
|
if (INSTANCE.debug >= level) {\
|
||||||
TIMEPRINT("[D%d %s:%d] ", level, __FILE__, __LINE__); \
|
TIMEPRINT("[D%d %s:%d] ", level, __FILE__, __LINE__); \
|
||||||
fprintf(stderr, __VA_ARGS__);\
|
fprintf(stderr, __VA_ARGS__);\
|
||||||
fprintf(stderr, "\n");\
|
fprintf(stderr, "\n");\
|
||||||
@ -101,7 +101,7 @@ extern const unsigned char raw_header[RAW_HDR_LEN];
|
|||||||
fprintf(stderr, __VA_ARGS__);
|
fprintf(stderr, __VA_ARGS__);
|
||||||
|
|
||||||
#define DEBUG(level, ...) \
|
#define DEBUG(level, ...) \
|
||||||
if (debug >= level) {\
|
if (INSTANCE.debug >= level) {\
|
||||||
fprintf(stderr, "[D%d] ", level); \
|
fprintf(stderr, "[D%d] ", level); \
|
||||||
fprintf(stderr, __VA_ARGS__);\
|
fprintf(stderr, __VA_ARGS__);\
|
||||||
fprintf(stderr, "\n");\
|
fprintf(stderr, "\n");\
|
||||||
|
Loading…
Reference in New Issue
Block a user