do not enable verbose by default in the debug build; add trace messages for verbose level 2

This commit is contained in:
daan 2019-07-04 09:28:22 -07:00
parent 069208b184
commit 6abdc5f5a3
2 changed files with 21 additions and 1 deletions

View file

@ -14,12 +14,19 @@ terms of the MIT license. A copy of the license can be found in the file
#define MI_TLS_RECURSE_GUARD
#endif
#if (MI_DEBUG>0)
#define mi_trace_message(...) _mi_trace_message(__VA_ARGS__)
#else
#define mi_trace_message(...)
#endif
// "options.c"
void _mi_fprintf(FILE* out, const char* fmt, ...);
void _mi_error_message(const char* fmt, ...);
void _mi_warning_message(const char* fmt, ...);
void _mi_verbose_message(const char* fmt, ...);
void _mi_trace_message(const char* fmt, ...);
// "init.c"
extern mi_stats_t _mi_stats_main;
@ -116,6 +123,11 @@ bool _mi_page_is_valid(mi_page_t* page);
Inlined definitions
----------------------------------------------------------- */
#define UNUSED(x) (void)(x)
#if (MI_DEBUG>0)
#define UNUSED_RELEASE(x)
#else
#define UNUSED_RELEASE(x) UNUSED(x)
#endif
#define MI_INIT4(x) x(),x(),x(),x()
#define MI_INIT8(x) MI_INIT4(x),MI_INIT4(x)