toaruos/base/usr/include/assert.h

15 lines
345 B
C
Raw Normal View History

2018-10-12 05:15:40 +03:00
#pragma once
#include <_cheader.h>
_Begin_C_Header
#ifndef NDEBUG
2018-10-12 04:35:28 +03:00
extern void __assert_func(const char * file, int line, const char * func, const char * failedexpr);
2018-05-08 17:04:21 +03:00
#define assert(statement) ((statement) ? (void)0 : __assert_func(__FILE__, __LINE__, __FUNCTION__, #statement))
2018-06-25 09:45:32 +03:00
#else
#define assert(statement) ((void)0)
#endif
2018-10-12 05:15:40 +03:00
_End_C_Header