-enum bt_field_class_dynamic_array_set_length_field_class_status
-bt_field_class_dynamic_array_set_length_field_class(
- struct bt_field_class *fc,
- struct bt_field_class *length_fc)
-{
- struct bt_field_class_dynamic_array *array_fc = (void *) fc;
-
- BT_ASSERT_PRE_NON_NULL(fc, "Dynamic array field class");
- BT_ASSERT_PRE_NON_NULL(length_fc, "Length field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY,
- "Field class");
- BT_ASSERT_PRE_FC_IS_UNSIGNED_INT(length_fc, "Length field class");
- BT_ASSERT_PRE_DEV_FC_HOT(fc, "Dynamic array field class");
- array_fc->length_fc = length_fc;
- bt_object_get_no_null_check(array_fc->length_fc);
- bt_field_class_freeze(length_fc);
- return BT_FUNC_STATUS_OK;
-}
-