lib: make bt_field_is_*() and bt_field_type_is_*() static inline
[babeltrace.git] / lib / ctf-ir / field-types.c
index 11764121f76f6274996148d20ad4284f59be005a..4e808b938e5faa22072af00dbb7d2eea080d1b85 100644 (file)
@@ -165,7 +165,7 @@ void bt_field_type_common_initialize(struct bt_field_type_common *ft,
        BT_ASSERT(ft && (ft->id > BT_FIELD_TYPE_ID_UNKNOWN) &&
                (ft->id < BT_FIELD_TYPE_ID_NR));
 
-       bt_object_init(ft, release_func);
+       bt_object_init_shared(&ft->base, release_func);
        ft->methods = methods;
 
        if (init_bo) {
@@ -1430,7 +1430,7 @@ bt_field_type_common_enumeration_find_mappings_type(
                goto end;
        }
 
-       bt_object_init(&iter->base, bt_field_type_enum_iter_destroy);
+       bt_object_init_shared(&iter->base, bt_field_type_enum_iter_destroy);
        iter->enumeration_ft = bt_get(ft);
        iter->index = -1;
        iter->type = iterator_type;
@@ -3390,48 +3390,8 @@ enum bt_field_type_id bt_field_type_get_type_id(struct bt_field_type *ft)
        return bt_field_type_common_get_type_id((void *) ft);
 }
 
-int bt_field_type_is_integer(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_INTEGER;
-}
-
-int bt_field_type_is_floating_point(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_FLOAT;
-}
-
-int bt_field_type_is_enumeration(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_ENUM;
-}
-
-int bt_field_type_is_string(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_STRING;
-}
-
-int bt_field_type_is_structure(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_STRUCT;
-}
-
-int bt_field_type_is_array(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_ARRAY;
-}
-
-int bt_field_type_is_sequence(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_SEQUENCE;
-}
-
-int bt_field_type_is_variant(struct bt_field_type *type)
-{
-       return bt_field_type_get_type_id(type) == BT_FIELD_TYPE_ID_VARIANT;
-}
-
 BT_HIDDEN
-void _bt_field_type_common_freeze(struct bt_field_type_common *ft)
+void bt_field_type_common_freeze(struct bt_field_type_common *ft)
 {
        if (!ft || ft->frozen) {
                return;
@@ -3442,9 +3402,9 @@ void _bt_field_type_common_freeze(struct bt_field_type_common *ft)
 }
 
 BT_HIDDEN
-void _bt_field_type_freeze(struct bt_field_type *ft)
+void bt_field_type_freeze(struct bt_field_type *ft)
 {
-       _bt_field_type_common_freeze((void *) ft);
+       bt_field_type_common_freeze((void *) ft);
 }
 
 BT_HIDDEN
This page took 0.025313 seconds and 4 git commands to generate.