/*
- * Copyright 2018 - Philippe Proulx <pproulx@efficios.com>
+ * SPDX-License-Identifier: MIT
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
*/
#include <babeltrace2/babeltrace.h>
#include "common/macros.h"
#include "common/assert.h"
#include <glib.h>
+#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <inttypes.h>
if (fc->base.is_signed) {
ret = bt_field_class_enumeration_signed_add_mapping(
ir_fc, mapping->label->str, range_set);
- BT_RANGE_SET_SIGNED_PUT_REF_AND_RESET(range_set);
+ BT_INTEGER_RANGE_SET_SIGNED_PUT_REF_AND_RESET(range_set);
} else {
ret = bt_field_class_enumeration_unsigned_add_mapping(
ir_fc, mapping->label->str, range_set);
- BT_RANGE_SET_UNSIGNED_PUT_REF_AND_RESET(range_set);
+ BT_INTEGER_RANGE_SET_UNSIGNED_PUT_REF_AND_RESET(range_set);
}
BT_ASSERT(ret == 0);
bt_field_class_enumeration_signed_mapping_borrow_ranges_const(
mapping);
BT_ASSERT(range_set);
- ret = bt_field_class_variant_with_selector_integer_signed_append_option(
+ ret = bt_field_class_variant_with_selector_field_integer_signed_append_option(
ir_fc, named_fc->name->str,
option_ir_fc, range_set);
} else {
bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const(
mapping);
BT_ASSERT(range_set);
- ret = bt_field_class_variant_with_selector_integer_unsigned_append_option(
+ ret = bt_field_class_variant_with_selector_field_integer_unsigned_append_option(
ir_fc, named_fc->name->str,
option_ir_fc, range_set);
}
ir_fc = ctf_field_class_variant_to_ir(ctx, (void *) fc);
break;
default:
- abort();
+ bt_common_abort();
}
fc->ir_fc = ir_fc;
fc = ctx->ec->payload_fc;
break;
default:
- abort();
+ bt_common_abort();
}
if (fc && ctf_field_class_struct_has_immediate_member_in_ir(