Changes in libcfa/src/stdhdr/assert.h [e3fea42:77125cc]
- File:
-
- 1 edited
-
libcfa/src/stdhdr/assert.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdhdr/assert.h
re3fea42 r77125cc 27 27 #define assertf( expr, fmt, ... ) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ )) 28 28 29 void __assert_warn_f( const char assertion[], const char file[], unsigned int line, const char function[], const char fmt[], ... ) __attribute__((format( printf, 5, 6) )); 29 30 void __assert_fail_f( const char assertion[], const char file[], unsigned int line, const char function[], const char fmt[], ... ) __attribute__((noreturn, format( printf, 5, 6) )); 30 31 #endif 31 32 32 33 #if !defined(NDEBUG) && (defined(__CFA_DEBUG__) || defined(__CFA_VERIFY__)) 34 #define __CFA_WITH_VERIFY__ 33 35 #define verify(x) assert(x) 34 36 #define verifyf(x, ...) assertf(x, __VA_ARGS__) 35 #define __CFA_WITH_VERIFY__ 37 #define verifyfail(...) 38 #define warnf( expr, fmt, ... ) ({ static bool check_once##__LINE__ = false; if( false == check_once##__LINE__ && false == (expr)) { check_once##__LINE__ = true; __assert_warn_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ); } }) 36 39 #else 37 40 #define verify(x) 38 41 #define verifyf(x, ...) 42 #define verifyfail(...) 43 #define warnf( expr, fmt, ... ) 39 44 #endif 40 45
Note:
See TracChangeset
for help on using the changeset viewer.