#define BT_LOG_TAG "LIB/EVENT"
#include "lib/logging.h"
-#include "lib/assert-pre.h"
+#include "lib/assert-cond.h"
#include <babeltrace2/trace-ir/event.h>
#include <babeltrace2/trace-ir/event-class.h>
#include <babeltrace2/trace-ir/stream-class.h>
struct bt_event_class *bt_event_borrow_class(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->class;
}
struct bt_stream *bt_event_borrow_stream(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->stream;
}
struct bt_field *bt_event_borrow_common_context_field(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->common_context_field;
}
const struct bt_field *bt_event_borrow_common_context_field_const(
const struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->common_context_field;
}
struct bt_field *bt_event_borrow_specific_context_field(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->specific_context_field;
}
const struct bt_field *bt_event_borrow_specific_context_field_const(
const struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->specific_context_field;
}
struct bt_field *bt_event_borrow_payload_field(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->payload_field;
}
const struct bt_field *bt_event_borrow_payload_field_const(
const struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->payload_field;
}
struct bt_packet *bt_event_borrow_packet(struct bt_event *event)
{
- BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+ BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
return event->packet;
}