Changes in libcfa/src/stdhdr/assert.h [77125cc:e3fea42]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdhdr/assert.h
r77125cc re3fea42 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) ));30 29 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) )); 31 30 #endif 32 31 33 32 #if !defined(NDEBUG) && (defined(__CFA_DEBUG__) || defined(__CFA_VERIFY__)) 34 #define __CFA_WITH_VERIFY__35 33 #define verify(x) assert(x) 36 34 #define verifyf(x, ...) assertf(x, __VA_ARGS__) 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__ ); } }) 35 #define __CFA_WITH_VERIFY__ 39 36 #else 40 37 #define verify(x) 41 38 #define verifyf(x, ...) 42 #define verifyfail(...)43 #define warnf( expr, fmt, ... )44 39 #endif 45 40
Note: See TracChangeset
for help on using the changeset viewer.