return enumeration_type->has_overlapping_ranges;
}
+static
+int bt_ctf_field_type_enumeration_get_mapping_name(
+ struct bt_ctf_field_type *enum_field_type,
+ int index,
+ const char **mapping_name)
+{
+ int ret = 0;
+ struct enumeration_mapping *mapping;
+
+ if (!enum_field_type || index < 0) {
+ ret = -1;
+ goto end;
+ }
+
+ mapping = get_enumeration_mapping(enum_field_type, index);
+ if (!mapping) {
+ ret = -1;
+ goto end;
+ }
+
+ if (mapping_name) {
+ *mapping_name = g_quark_to_string(mapping->string);
+ }
+end:
+ return ret;
+}
+
static
int bt_ctf_field_type_variant_validate(struct bt_ctf_field_type *type)
{
return NULL;
}
-int bt_ctf_field_type_enumeration_get_mapping_name(
- struct bt_ctf_field_type *enum_field_type,
- int index,
- const char **mapping_name)
-{
- int ret = 0;
- struct enumeration_mapping *mapping;
-
- if (!enum_field_type || index < 0) {
- ret = -1;
- goto end;
- }
-
- mapping = get_enumeration_mapping(enum_field_type, index);
- if (!mapping) {
- ret = -1;
- goto end;
- }
-
- if (mapping_name) {
- *mapping_name = g_quark_to_string(mapping->string);
- }
-end:
- return ret;
-}
-
int bt_ctf_field_type_enumeration_mapping_iterator_get_name(
struct bt_ctf_field_type_enumeration_mapping_iterator *iter,
const char **mapping_name)
extern int bt_ctf_field_type_enumeration_get_mapping_count(
struct bt_ctf_field_type *enum_field_type);
-extern int bt_ctf_field_type_enumeration_get_mapping_name(
- struct bt_ctf_field_type *enum_field_type, int index,
- const char **name);
-
/**
@brief Returns the signed mapping of the @enumft
\p enum_field_type at index \p index.