Skip to content

Commit 62bdc93

Browse files
committed
Maybe assert.h
1 parent 71f2f7a commit 62bdc93

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/include/assert.h

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef _ASSERT_H
2+
#define _ASSERT_H
3+
4+
#if defined (NDEBUG)
5+
#define assert(expression) ((void)0)
6+
#else
7+
#define assert(expression) (void)((expression) || (__assert(#expression, __FILE__, __LINE__), 0))
8+
#endif
9+
10+
extern void __assert(const char *message, const char* file, int line);
11+
12+
#endif

0 commit comments

Comments
 (0)