X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Ffs-sink%2Ffs-sink-ctf-meta.h;h=063fb03a66c73a0f7758931e275e90e6adfa5782;hb=98b15851a941e7342b8bb19e265cdc3a40fabfb8;hp=4789f0ffd2321577952c9759ef89cf7b039dff69;hpb=43a94dc939c1222729d90286b651c5ecc8d2f149;p=babeltrace.git diff --git a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h index 4789f0ff..063fb03a 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h +++ b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h @@ -221,8 +221,8 @@ void _fs_sink_ctf_field_class_int_init(struct fs_sink_ctf_field_class_int *fc, (unsigned int) bt_field_class_integer_get_field_value_range( ir_fc), index_in_parent); - fc->is_signed = (ir_fc_type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER || - ir_fc_type == BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION); + fc->is_signed = bt_field_class_type_is(ir_fc_type, + BT_FIELD_CLASS_TYPE_SIGNED_INTEGER); } static inline @@ -307,7 +307,9 @@ struct fs_sink_ctf_field_class_float *fs_sink_ctf_field_class_float_create( BT_ASSERT(fc); _fs_sink_ctf_field_class_bit_array_init((void *) fc, FS_SINK_CTF_FIELD_CLASS_TYPE_FLOAT, - ir_fc, bt_field_class_real_is_single_precision(ir_fc) ? 32 : 64, + ir_fc, + bt_field_class_get_type(ir_fc) == + BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL ? 32 : 64, index_in_parent); return fc; } @@ -376,7 +378,7 @@ struct fs_sink_ctf_field_class_variant *fs_sink_ctf_field_class_variant_create_e BT_ASSERT(fc->tag_ref); fc->tag_is_before = bt_field_class_get_type(fc->base.ir_fc) == - BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR; + BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD; return fc; } @@ -409,8 +411,8 @@ struct fs_sink_ctf_field_class_sequence *fs_sink_ctf_field_class_sequence_create fc->length_ref = g_string_new(NULL); BT_ASSERT(fc->length_ref); fc->length_is_before = - bt_field_class_array_dynamic_borrow_length_field_path_const(ir_fc) == - NULL; + bt_field_class_get_type(ir_fc) == + BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD; return fc; } @@ -628,8 +630,8 @@ struct fs_sink_ctf_named_field_class * fs_sink_ctf_field_class_struct_borrow_member_by_index( struct fs_sink_ctf_field_class_struct *fc, uint64_t index) { - BT_ASSERT(fc); - BT_ASSERT(index < fc->members->len); + BT_ASSERT_DBG(fc); + BT_ASSERT_DBG(index < fc->members->len); return &g_array_index(fc->members, struct fs_sink_ctf_named_field_class, index); } @@ -642,8 +644,8 @@ fs_sink_ctf_field_class_struct_borrow_member_by_name( uint64_t i; struct fs_sink_ctf_named_field_class *ret_named_fc = NULL; - BT_ASSERT(fc); - BT_ASSERT(name); + BT_ASSERT_DBG(fc); + BT_ASSERT_DBG(name); for (i = 0; i < fc->members->len; i++) { struct fs_sink_ctf_named_field_class *named_fc = @@ -742,8 +744,8 @@ struct fs_sink_ctf_named_field_class * fs_sink_ctf_field_class_variant_borrow_option_by_index( struct fs_sink_ctf_field_class_variant *fc, uint64_t index) { - BT_ASSERT(fc); - BT_ASSERT(index < fc->options->len); + BT_ASSERT_DBG(fc); + BT_ASSERT_DBG(index < fc->options->len); return &g_array_index(fc->options, struct fs_sink_ctf_named_field_class, index); } @@ -756,8 +758,8 @@ fs_sink_ctf_field_class_variant_borrow_option_by_name( uint64_t i; struct fs_sink_ctf_named_field_class *ret_named_fc = NULL; - BT_ASSERT(fc); - BT_ASSERT(name); + BT_ASSERT_DBG(fc); + BT_ASSERT_DBG(name); for (i = 0; i < fc->options->len; i++) { struct fs_sink_ctf_named_field_class *named_fc =