diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:25 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:25 +0200 |
commit | 4d2e8e4cab5824d973f4a70bc271c461007c75fc (patch) | |
tree | 0a6ef767404661261264ebd55dc346dfeca625fb /thirdparty/zstd/common/debug.h | |
parent | 0e7c9d5338a108abde7b87a741482612f814155a (diff) | |
parent | a88b4a4d56a923ad1f3652eb1133676f8c96c44d (diff) | |
download | redot-engine-4d2e8e4cab5824d973f4a70bc271c461007c75fc.tar.gz |
Merge pull request #90253 from akien-mga/zstd-1.5.6
zstd: Update to upstream version 1.5.6
Diffstat (limited to 'thirdparty/zstd/common/debug.h')
-rw-r--r-- | thirdparty/zstd/common/debug.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/thirdparty/zstd/common/debug.h b/thirdparty/zstd/common/debug.h index 0e9817ea6d..a16b69e574 100644 --- a/thirdparty/zstd/common/debug.h +++ b/thirdparty/zstd/common/debug.h @@ -85,18 +85,27 @@ extern int g_debuglevel; /* the variable is only declared, It's useful when enabling very verbose levels on selective conditions (such as position in src) */ -# define RAWLOG(l, ...) { \ - if (l<=g_debuglevel) { \ - ZSTD_DEBUG_PRINT(__VA_ARGS__); \ - } } -# define DEBUGLOG(l, ...) { \ - if (l<=g_debuglevel) { \ - ZSTD_DEBUG_PRINT(__FILE__ ": " __VA_ARGS__); \ - ZSTD_DEBUG_PRINT(" \n"); \ - } } +# define RAWLOG(l, ...) \ + do { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__VA_ARGS__); \ + } \ + } while (0) + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define LINE_AS_STRING TOSTRING(__LINE__) + +# define DEBUGLOG(l, ...) \ + do { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__FILE__ ":" LINE_AS_STRING ": " __VA_ARGS__); \ + ZSTD_DEBUG_PRINT(" \n"); \ + } \ + } while (0) #else -# define RAWLOG(l, ...) {} /* disabled */ -# define DEBUGLOG(l, ...) {} /* disabled */ +# define RAWLOG(l, ...) do { } while (0) /* disabled */ +# define DEBUGLOG(l, ...) do { } while (0) /* disabled */ #endif |