2021-12-14 20:37:11 +00:00
|
|
|
#ifndef KERNAUX_INCLUDED_ASSERT
|
|
|
|
#define KERNAUX_INCLUDED_ASSERT 1
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define kernaux_assert(cond) \
|
2021-12-14 20:48:35 +00:00
|
|
|
((cond) ? (void)0 : kernaux_assert_do(__FILE__, __LINE__, #cond))
|
2021-12-14 20:37:11 +00:00
|
|
|
|
|
|
|
void kernaux_assert_do(const char *file, int line, const char *str);
|
|
|
|
|
|
|
|
extern void (*kernaux_assert_cb)(const char *file, int line, const char *str);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|