# error Include "logging/log.h" before this header.
#endif
+#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>
#include "common/macros.h"
* arguments using BT_LOGF(), and abort.
*
* To assert that a postcondition is satisfied or that some internal
- * object/context/value is in the expected state, use BT_ASSERT().
+ * object/context/value is in the expected state, use BT_ASSERT_DBG().
*/
# define BT_CTF_ASSERT_PRE(_cond, _fmt, ...) \
do { \
BT_CTF_ASSERT_PRE_MSG("CTF writer precondition not satisfied; error is:"); \
BT_CTF_ASSERT_PRE_MSG((_fmt), ##__VA_ARGS__); \
BT_CTF_ASSERT_PRE_MSG("Aborting..."); \
- abort(); \
+ bt_common_abort(); \
} \
} while (0)
* Developer mode: asserts that a given variable is not NULL.
*/
#define BT_CTF_ASSERT_PRE_NON_NULL(_obj, _obj_name) \
- BT_CTF_ASSERT_PRE((_obj) != NULL, "%s is NULL: ", _obj_name)
+ BT_CTF_ASSERT_PRE((_obj), "%s is NULL: ", _obj_name)
/*
* Developer mode: asserts that a given object is NOT frozen. This macro