/* static assert is triggered at compile time, leaving no runtime artefact. *staticassertonlyworkswithcompile-timeconstants.
* Also, this variant can only be used inside a function. */ #define DEBUG_STATIC_ASSERT(c) (void)sizeof(char[(c) ? 1 : -1])
/* DEBUGLEVEL is expected to be defined externally, *typicallythroughcompilercommandline.
* Value must be a number. */ #ifndef DEBUGLEVEL # define DEBUGLEVEL 0 #endif
#if (DEBUGLEVEL>=1) # define ZSTD_DEPS_NEED_ASSERT # include "zstd_deps.h" #else # ifndef assert /* assert may be already defined, due to prior #include <assert.h> */ # define assert(condition) ((void)0) /* disable assert (default) */ # endif #endif
#if (DEBUGLEVEL>=2) # define ZSTD_DEPS_NEED_IO # include "zstd_deps.h"
extern int g_debuglevel; /* the variable is only declared, itactuallylivesindebug.c, andissharedbythewholeprocess. It'snotthread-safe. It'susefulwhenenablingveryverboselevels
on selective conditions (such as position in src) */
# define RAWLOG(l, ...) \ do { \
if (l<=g_debuglevel) { \
ZSTD_DEBUG_PRINT(__VA_ARGS__); \
} \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.