Check for STRINGIZE_VALUE_OF before defining it
This commit is contained in:
parent
9c9cb6a05a
commit
3740309427
@ -3,7 +3,9 @@
|
||||
|
||||
extern _noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr);
|
||||
|
||||
#ifndef STRINGIZE_VALUE_OF
|
||||
#define STRINGIZE(x) #x
|
||||
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
||||
#endif
|
||||
|
||||
#define check(expr) (expr) || __check_failed(__FILE__, STRINGIZE_VALUE_OF(__LINE__), __PRETTY_FUNCTION__, #expr)
|
||||
|
Loading…
Reference in New Issue
Block a user