Revert ABI-breaking enum bt_ctf_string_encoding change
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Oct 2016 18:46:49 +0000 (14:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Oct 2016 18:46:49 +0000 (14:46 -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 7b52a41f30b09cd8b65b8790d0bea4c151cbaace..3a23d96e428c8a14d4c9bdf95685e0e1c8dbbe00 100644 (file)
@@ -806,21 +806,21 @@ end:
 }
 
 int bt_ctf_field_type_integer_set_encoding(struct bt_ctf_field_type *type,
-               enum bt_ctf_string_encoding encoding)
+               enum ctf_string_encoding encoding)
 {
        int ret = 0;
        struct bt_ctf_field_type_integer *integer;
 
        if (!type || type->frozen ||
                (type->declaration->id != CTF_TYPE_INTEGER) ||
-               (encoding < BT_CTF_STRING_ENCODING_NONE) ||
-               (encoding >= BT_CTF_STRING_ENCODING_UNKNOWN)) {
+               (encoding < CTF_STRING_NONE) ||
+               (encoding >= CTF_STRING_UNKNOWN)) {
                ret = -1;
                goto end;
        }
 
        integer = container_of(type, struct bt_ctf_field_type_integer, parent);
-       integer->declaration.encoding = (enum ctf_string_encoding) encoding;
+       integer->declaration.encoding = encoding;
 end:
        return ret;
 }
@@ -2000,20 +2000,20 @@ end:
 }
 
 int bt_ctf_field_type_string_set_encoding(struct bt_ctf_field_type *type,
-               enum bt_ctf_string_encoding encoding)
+               enum ctf_string_encoding encoding)
 {
        int ret = 0;
        struct bt_ctf_field_type_string *string;
 
        if (!type || type->declaration->id != CTF_TYPE_STRING ||
-               (encoding != BT_CTF_STRING_ENCODING_UTF8 &&
-               encoding != BT_CTF_STRING_ENCODING_ASCII)) {
+               (encoding != CTF_STRING_UTF8 &&
+               encoding != CTF_STRING_ASCII)) {
                ret = -1;
                goto end;
        }
 
        string = container_of(type, struct bt_ctf_field_type_string, parent);
-       string->declaration.encoding = (enum ctf_string_encoding) encoding;
+       string->declaration.encoding = encoding;
 end:
        return ret;
 }
index cce364c42fd352d48c2efa0018ce93291c905438..b4aedbc571eabe60ddf395ab0b7c2dfe9e4d0506 100644 (file)
@@ -130,13 +130,13 @@ extern int bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *integer,
  *
  * @param integer Integer type.
  * @param encoding Integer output encoding, defaults to
- *     BT_CTF_STRING_ENCODING_NONE
+ *     CTF_STRING_NONE
  *
  * Returns 0 on success, a negative value on error.
  */
 extern int bt_ctf_field_type_integer_set_encoding(
                struct bt_ctf_field_type *integer,
-               enum bt_ctf_string_encoding encoding);
+               enum ctf_string_encoding encoding);
 
 /*
  * bt_ctf_field_type_enumeration_create: create an enumeration field type.
@@ -339,15 +339,15 @@ extern struct bt_ctf_field_type *bt_ctf_field_type_string_create(void);
  * Set the string type's encoding.
  *
  * @param string_type String type.
- * @param encoding String field encoding, default BT_CTF_STRING_ENCODING_ASCII.
- *     Valid values are BT_CTF_STRING_ENCODING_ASCII and
- *     BT_CTF_STRING_ENCODING_UTF8.
+ * @param encoding String field encoding, default CTF_STRING_ASCII.
+ *     Valid values are CTF_STRING_ASCII and
+ *     CTF_STRING_UTF8.
  *
  * Returns 0 on success, a negative value on error.
  */
 extern int bt_ctf_field_type_string_set_encoding(
                struct bt_ctf_field_type *string_type,
-               enum bt_ctf_string_encoding encoding);
+               enum ctf_string_encoding encoding);
 
 /*
  * bt_ctf_field_type_set_alignment: set a field type's alignment.
This page took 0.028286 seconds and 4 git commands to generate.