extern const char *bt_ctf_field_type_variant_get_tag_name(
struct bt_ctf_field_type *variant);
+/*
+ * bt_ctf_field_type_variant_set_tag_name: set a variant's tag name.
+ *
+ * @param variant Variant type.
+ * @param name Tag field name.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_field_type_variant_set_tag_name(
+ struct bt_ctf_field_type *variant, const char *name);
+
/*
* bt_ctf_field_type_variant_add_field: add a field to a variant.
*
*
* @param type Field type.
*
- * Returns the field type's alignment on success, a negative value on error.
+ * Returns the field type's alignment on success, a negative value on error and
+ * 0 if the alignment is undefined (as in the case of a variant).
*/
extern int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type);
extern enum ctf_type_id bt_ctf_field_type_get_type_id(
struct bt_ctf_field_type *type);
-/*
- * bt_ctf_field_type_get_alias_nameL get a field type's alias name
- *
- * A type's alias name is set if it was resolved from a typedef or
- * typealias. Note that types that are resolved from a ypealias or
- * typedef are distinct from the underlying type and can't be compared
- * pointer-wise.
- *
- * @param type Field type.
- *
- * Returns a field type's alias name, NULL on error.
- */
-extern const char *bt_ctf_field_type_get_alias_name(
- struct bt_ctf_field_type *type);
-
/*
* bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement
* the field type's reference count.
*
+ * You may also use bt_ctf_get() and bt_ctf_put() with field type objects.
+ *
* These functions ensure that the field type won't be destroyed while it
* is in use. The same number of get and put (plus one extra put to
* release the initial reference done at creation) have to be done to