X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Ffields.h;h=5a030b356e7d4454b32c7c0d892291c3016b3dc5;hb=9ac68eb139149d2768848dae5e263cc5a755d439;hp=5120d9e41739f665335c4947311c8112a0b41a1f;hpb=7fcd5734fd11d2238203dbfefff5df4bb5b11758;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/fields.h b/include/babeltrace/ctf-ir/fields.h index 5120d9e4..5a030b35 100644 --- a/include/babeltrace/ctf-ir/fields.h +++ b/include/babeltrace/ctf-ir/fields.h @@ -32,6 +32,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ name within a @structfield with bt_ctf_field_structure_set_field(). You can get a reference to the @ft which was used to create a field with bt_ctf_field_get_type(). You can get the -\link #bt_ctf_type_id type ID\endlink of this field type directly with +\link #bt_ctf_field_type_id type ID\endlink of this field type directly with bt_ctf_field_get_type_id(). You can get a deep copy of a field with bt_ctf_field_copy(). The field @@ -187,12 +188,12 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type( @param[in] field Field of which to get the type ID of its parent field type.. @returns Type ID of the parent field type of \p field, - or #BT_CTF_TYPE_ID_UNKNOWN on error. + or #BT_CTF_FIELD_TYPE_ID_UNKNOWN on error. @prenotnull{field} @postrefcountsame{field} -@sa #bt_ctf_type_id: CTF IR field type ID. +@sa #bt_ctf_field_type_id: CTF IR field type ID. @sa bt_ctf_field_is_integer(): Returns whether or not a given field is a @intfield. @sa bt_ctf_field_is_floating_point(): Returns whether or not a given @@ -210,7 +211,7 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type( @sa bt_ctf_field_is_variant(): Returns whether or not a given field is a @varfield. */ -extern enum bt_ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field); +extern enum bt_ctf_field_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field); /* * bt_ctf_field_signed_integer_get_value: get a signed integer field's value @@ -862,9 +863,12 @@ exist. @sa bt_ctf_field_structure_set_field(): Sets the field of a given structure field. */ -extern struct bt_ctf_field *bt_ctf_field_structure_get_field( +extern struct bt_ctf_field *bt_ctf_field_structure_get_field_by_name( struct bt_ctf_field *struct_field, const char *name); +/* Pre-2.0 CTF writer compatibility */ +#define bt_ctf_field_structure_get_field bt_ctf_field_structure_get_field_by_name + /** @brief Returns the @field at index \p index in the @structfield \p struct_field. @@ -889,7 +893,7 @@ extern struct bt_ctf_field *bt_ctf_field_structure_get_field( structure field. */ extern struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index( - struct bt_ctf_field *struct_field, int index); + struct bt_ctf_field *struct_field, uint64_t index); /** @brief Sets the field of the @structfield \p struct_field named \p name