This function can be useful for some source plugins which support
aliases in their metadata description: the base type is created
once, then one copy is created for each instance (possibly with
a different tag if it's a variant alias, for example).
The copy and all its children have their valid flag reset to 0 (as
well as their frozen flag). This means that they are not considered
valid after the copy operation. The length and tag field paths of
resp. sequence and variant field types will be resolved later when
this copy is used as one of the types of an event class, a stream
class, or a trace, and when it's about to be frozen in those
contexts.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
}
-BT_HIDDEN
struct bt_ctf_field_type *bt_ctf_field_type_copy(struct bt_ctf_field_type *type)
{
struct bt_ctf_field_type *copy = NULL;
void bt_ctf_field_type_set_native_byte_order(
struct bt_ctf_field_type *type, int byte_order);
-/* Deep copy a field type */
-BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_copy(
- struct bt_ctf_field_type *type);
-
BT_HIDDEN
int bt_ctf_field_type_structure_get_field_name_index(
struct bt_ctf_field_type *structure, const char *name);
extern int bt_ctf_field_type_compare(struct bt_ctf_field_type *type_a,
struct bt_ctf_field_type *type_b);
+extern struct bt_ctf_field_type *bt_ctf_field_type_copy(
+ struct bt_ctf_field_type *type);
+
/*
* bt_ctf_field_type_get_type_id: get a field type's bt_ctf_type_id.
*