#include <babeltrace/ctf-ir/resolve-internal.h>
#include <babeltrace/ctf-ir/trace-internal.h>
#include <babeltrace/ctf-ir/stream-class-internal.h>
-#include <babeltrace/ctf-ir/event-internal.h>
-#include <babeltrace/ctf-ir/event-types-internal.h>
+#include <babeltrace/ctf-ir/field-types-internal.h>
+#include <babeltrace/ctf-ir/event-class-internal.h>
#include <babeltrace/values.h>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/ref.h>
int field_type_contains_sequence_or_variant_ft(struct bt_ctf_field_type *type)
{
int ret = 0;
- enum ctf_type_id type_id = bt_ctf_field_type_get_type_id(type);
+ enum bt_ctf_type_id type_id = bt_ctf_field_type_get_type_id(type);
switch (type_id) {
- case CTF_TYPE_SEQUENCE:
- case CTF_TYPE_VARIANT:
+ case BT_CTF_TYPE_ID_SEQUENCE:
+ case BT_CTF_TYPE_ID_VARIANT:
ret = 1;
goto end;
- case CTF_TYPE_ARRAY:
- case CTF_TYPE_STRUCT:
+ case BT_CTF_TYPE_ID_ARRAY:
+ case BT_CTF_TYPE_ID_STRUCT:
{
int i;
int field_count = bt_ctf_field_type_get_field_count(type);
enum bt_ctf_validation_flag replace_flags)
{
if ((replace_flags & BT_CTF_VALIDATION_FLAG_TRACE) && trace) {
+ bt_ctf_field_type_freeze(trace->packet_header_type);
BT_MOVE(trace->packet_header_type, output->packet_header_type);
}
if ((replace_flags & BT_CTF_VALIDATION_FLAG_STREAM) && stream_class) {
+ bt_ctf_field_type_freeze(stream_class->packet_context_type);
+ bt_ctf_field_type_freeze(stream_class->event_header_type);
+ bt_ctf_field_type_freeze(stream_class->event_context_type);
BT_MOVE(stream_class->packet_context_type,
output->packet_context_type);
BT_MOVE(stream_class->event_header_type,
}
if ((replace_flags & BT_CTF_VALIDATION_FLAG_EVENT) && event_class) {
+ bt_ctf_field_type_freeze(event_class->context);
+ bt_ctf_field_type_freeze(event_class->fields);
BT_MOVE(event_class->context, output->event_context_type);
BT_MOVE(event_class->fields, output->event_payload_type);
}