Derive-C
Loading...
Searching...
No Matches
debug.h File Reference

Go to the source code of this file.

Macros

#define NAME   debug_string_builder
#define DEBUG_STRING(TYPE, INSTANCE)

Macro Definition Documentation

◆ DEBUG_STRING

#define DEBUG_STRING ( TYPE,
INSTANCE )
Value:
({ \
debug_string_builder builder = debug_string_builder_new(stdalloc_get()); \
NS(TYPE, debug)(INSTANCE, dc_debug_fmt_new(), debug_string_builder_stream(&builder)); \
char* string = debug_string_builder_release_string(&builder); \
debug_string_builder_delete(&builder); \
string; \
})
static void debug(SELF const *self, dc_debug_fmt fmt, FILE *stream)
Definition template.h:62
static dc_debug_fmt dc_debug_fmt_new()
Definition fmt.h:14
static char const * string(SELF const *self)
Gets access to the null terminated string.
Definition template.h:138

Definition at line 7 of file debug.h.

7#define DEBUG_STRING(TYPE, INSTANCE) \
8 ({ \
9 debug_string_builder builder = debug_string_builder_new(stdalloc_get()); \
10 NS(TYPE, debug)(INSTANCE, dc_debug_fmt_new(), debug_string_builder_stream(&builder)); \
11 char* string = debug_string_builder_release_string(&builder); \
12 debug_string_builder_delete(&builder); \
13 string; \
14 })

◆ NAME

#define NAME   debug_string_builder

Definition at line 4 of file debug.h.