1 #ifndef LIBJSON_GUARD_DEBUG_H
2 #define LIBJSON_GUARD_DEBUG_H
9 #define JSON_ASSERT_SAFE(condition, msg, code)\
11 if (json_unlikely(!(condition))){\
16 #define JSON_FAIL_SAFE(msg, code)\
22 #define JSON_ASSERT_SAFE(condition, msg, code) JSON_ASSERT(condition, msg)
23 #define JSON_FAIL_SAFE(msg, code) JSON_FAIL(msg)
26 #define JSON_FAIL(msg) JSONDebug::_JSON_FAIL(msg)
27 #define JSON_ASSERT(bo, msg) JSONDebug::_JSON_ASSERT(bo, msg)
32 static json_error_callback_t register_callback(json_error_callback_t callback) json_nothrow json_cold;
34 static void _JSON_FAIL(
const json_string & msg) json_nothrow json_cold;
35 static void _JSON_ASSERT(
bool condition,
const json_string & msg) json_nothrow json_cold;
39 #define JSON_ASSERT_SAFE(condition, msg, code)\
41 if (json_unlikely(!(condition))){\
45 #define JSON_FAIL_SAFE(msg, code)\
50 #define JSON_ASSERT_SAFE(condition, msg, code)
51 #define JSON_FAIL_SAFE(msg, code)
54 #define JSON_ASSERT(condition, msg)
55 #define JSON_FAIL(msg)