Remove bt_ctf_field_type_enumeration_get_mapping_name
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 24 Jan 2017 02:30:06 +0000 (21:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:09 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/field-types.c
include/babeltrace/ctf-ir/field-types.h

index 043df078464f5eb41d3bcec5b4f367c42b4546d7..9e06840d4bda7dedfb6da2b2bf84609fc84cb861 100644 (file)
@@ -632,6 +632,33 @@ bool bt_ctf_field_type_enumeration_has_overlapping_ranges(
        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)
 {
@@ -1119,32 +1146,6 @@ error:
        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)
index 7ae3ae55bbd3506392bd70dd90da09901bb67971..e9b5f25393bbd9e2eeeb4ef6deb070934fcf5cc2 100644 (file)
@@ -1316,10 +1316,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_get_container_type(
 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.
This page took 0.027746 seconds and 4 git commands to generate.