_name " has the wrong class type: expected-class-type=%s, " \
"%![field-]+f", \
bt_common_field_class_type_string(_cls_type), (_field))
#define BT_ASSERT_PRE_FIELD_IS_UNSIGNED_INT(_field, _name) \
BT_ASSERT_PRE( \
_name " has the wrong class type: expected-class-type=%s, " \
"%![field-]+f", \
bt_common_field_class_type_string(_cls_type), (_field))
#define BT_ASSERT_PRE_FIELD_IS_UNSIGNED_INT(_field, _name) \
BT_ASSERT_PRE( \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER || \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION, \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER || \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION, \
_name " is not an unsigned integer field: %![field-]+f", \
(_field))
#define BT_ASSERT_PRE_FIELD_IS_SIGNED_INT(_field, _name) \
BT_ASSERT_PRE( \
_name " is not an unsigned integer field: %![field-]+f", \
(_field))
#define BT_ASSERT_PRE_FIELD_IS_SIGNED_INT(_field, _name) \
BT_ASSERT_PRE( \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER || \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION, \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER || \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION, \
_name " is not a signed integer field: %![field-]+f", \
(_field))
#define BT_ASSERT_PRE_FIELD_IS_ARRAY(_field, _name) \
BT_ASSERT_PRE( \
_name " is not a signed integer field: %![field-]+f", \
(_field))
#define BT_ASSERT_PRE_FIELD_IS_ARRAY(_field, _name) \
BT_ASSERT_PRE( \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_STATIC_ARRAY || \
- ((struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY, \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_STATIC_ARRAY || \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY, \
_name " is not an array field: %![field-]+f", (_field))
#define BT_ASSERT_PRE_FIELD_IS_SET(_field, _name) \
_name " is not an array field: %![field-]+f", (_field))
#define BT_ASSERT_PRE_FIELD_IS_SET(_field, _name) \
_name " is not set: %!+f", (_field))
#define BT_ASSERT_PRE_FIELD_HOT(_field, _name) \
_name " is not set: %!+f", (_field))
#define BT_ASSERT_PRE_FIELD_HOT(_field, _name) \
": %!+f", (_field))
struct bt_field;
typedef struct bt_field *(* bt_field_create_func)(struct bt_field_class *);
typedef void (*bt_field_method_set_is_frozen)(struct bt_field *, bool);
": %!+f", (_field))
struct bt_field;
typedef struct bt_field *(* bt_field_create_func)(struct bt_field_class *);
typedef void (*bt_field_method_set_is_frozen)(struct bt_field *, bool);