File tree 2 files changed +4
-13
lines changed
2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 5
5
#ifndef ASSERT_H
6
6
#define ASSERT_H
7
7
8
- #if defined( NDEBUG ) || defined( ASSERT_STDC_VER ) /* standard version requested */
8
+ #include "cbl/except.h" /* except_t, EXCEPT_RAISE */
9
9
10
- #include <assert.h>
11
10
11
+ #if defined(NDEBUG ) || defined(ASSERT_STDC_VER ) /* standard version requested */
12
+ #include <assert.h>
12
13
#else /* use "assert.h" supporting exception */
13
-
14
- #include "cbl/except.h" /* EXCEPT_RAISE */
15
-
16
-
17
14
/* replaces standard assert() */
18
15
#define assert (e ) ((void)((e) || (EXCEPT_RAISE(assert_exceptfail), 0)))
16
+ #endif /* NDEBUG || ASSERT_STDC_VER */
19
17
20
18
21
19
/* exception for assertion failure */
22
20
extern const except_t assert_exceptfail ;
23
21
24
22
25
- #endif /* NDEBUG || ASSERT_STDC_VER */
26
-
27
23
#endif /* ASSERT_H */
28
24
29
25
/* end of assert.h */
Original file line number Diff line number Diff line change 10
10
#include <stdint.h> /* uintptr_t */
11
11
#endif /* __STDC_VERSION__ */
12
12
13
- /* direct references to assert_exceptfail, thus: */
14
- #ifdef NDEBUG
15
- #error "This module cannot be compiled with NDEBUG defined!"
16
- #endif
17
-
18
13
#include "cbl/assert.h" /* assert with exception support */
19
14
#include "cbl/except.h" /* except_raise, EXCEPT_RAISE */
20
15
#include "memory.h"
You can’t perform that action at this time.
0 commit comments