File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#ifndef ASSERT_H
66#define ASSERT_H
77
8- #if defined( NDEBUG ) || defined( ASSERT_STDC_VER ) /* standard version requested */
8+ #include "cbl/except.h" /* except_t, EXCEPT_RAISE */
99
10- #include <assert.h>
1110
11+ #if defined(NDEBUG ) || defined(ASSERT_STDC_VER ) /* standard version requested */
12+ #include <assert.h>
1213#else /* use "assert.h" supporting exception */
13-
14- #include "cbl/except.h" /* EXCEPT_RAISE */
15-
16-
1714/* replaces standard assert() */
1815#define assert (e ) ((void)((e) || (EXCEPT_RAISE(assert_exceptfail), 0)))
16+ #endif /* NDEBUG || ASSERT_STDC_VER */
1917
2018
2119/* exception for assertion failure */
2220extern const except_t assert_exceptfail ;
2321
2422
25- #endif /* NDEBUG || ASSERT_STDC_VER */
26-
2723#endif /* ASSERT_H */
2824
2925/* end of assert.h */
Original file line number Diff line number Diff line change 1010#include <stdint.h> /* uintptr_t */
1111#endif /* __STDC_VERSION__ */
1212
13- /* direct references to assert_exceptfail, thus: */
14- #ifdef NDEBUG
15- #error "This module cannot be compiled with NDEBUG defined!"
16- #endif
17-
1813#include "cbl/assert.h" /* assert with exception support */
1914#include "cbl/except.h" /* except_raise, EXCEPT_RAISE */
2015#include "memory.h"
You can’t perform that action at this time.
0 commit comments