#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 *ir_fc;
- ir_fc = bt_field_class_real_create(ctx->ir_tc);
- BT_ASSERT(ir_fc);
-
if (fc->base.size == 32) {
- bt_field_class_real_set_is_single_precision(ir_fc,
- BT_TRUE);
+ ir_fc = bt_field_class_real_single_precision_create(ctx->ir_tc);
+ } else {
+ ir_fc = bt_field_class_real_double_precision_create(ctx->ir_tc);
}
+ BT_ASSERT(ir_fc);
return ir_fc;
}
bt_field_class_enumeration_signed_mapping_borrow_ranges_const(
mapping);
BT_ASSERT(range_set);
- ret = bt_field_class_variant_with_selector_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_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);
}
BT_ASSERT(ret == 0);
}
- if (ctx->ec->log_level != -1) {
+ if (ctx->ec->is_log_level_set) {
bt_event_class_set_log_level(ir_ec, ctx->ec->log_level);
}