#include <stdint.h>
#include <string.h>
-#include <babeltrace2/ctf-writer/fields.h>
+#include <babeltrace2-ctf-writer/fields.h>
#include <babeltrace2/types.h>
#include "common/macros.h"
typedef int (*bt_ctf_field_common_method_validate)(struct bt_ctf_field_common *);
typedef struct bt_ctf_field_common *(*bt_ctf_field_common_method_copy)(
struct bt_ctf_field_common *);
-typedef bt_bool (*bt_ctf_field_common_method_is_set)(struct bt_ctf_field_common *);
+typedef bt_ctf_bool (*bt_ctf_field_common_method_is_set)(struct bt_ctf_field_common *);
typedef void (*bt_ctf_field_common_method_reset)(struct bt_ctf_field_common *);
struct bt_ctf_field_common_methods {
bool is_frozen);
BT_HIDDEN
-bt_bool bt_ctf_field_common_generic_is_set(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_common_generic_is_set(struct bt_ctf_field_common *field);
BT_HIDDEN
-bt_bool bt_ctf_field_common_structure_is_set_recursive(
+bt_ctf_bool bt_ctf_field_common_structure_is_set_recursive(
struct bt_ctf_field_common *field);
BT_HIDDEN
-bt_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common *field);
BT_HIDDEN
-bt_bool bt_ctf_field_common_array_is_set_recursive(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_common_array_is_set_recursive(struct bt_ctf_field_common *field);
BT_HIDDEN
-bt_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common *field);
#ifdef BT_DEV_MODE
# define bt_ctf_field_common_validate_recursive _bt_ctf_field_common_validate_recursive
#else
# define bt_ctf_field_common_validate_recursive(_field) (-1)
# define bt_ctf_field_common_set_is_frozen_recursive(_field, _is_frozen)
-# define bt_ctf_field_common_is_set_recursive(_field) (BT_FALSE)
+# define bt_ctf_field_common_is_set_recursive(_field) (BT_CTF_FALSE)
# define bt_ctf_field_common_reset_recursive(_field)
# define bt_ctf_field_common_set(_field, _val)
#endif
}
static inline
-bt_bool _bt_ctf_field_common_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool _bt_ctf_field_common_is_set_recursive(struct bt_ctf_field_common *field)
{
- bt_bool is_set = BT_FALSE;
+ bt_ctf_bool is_set = BT_CTF_FALSE;
if (!field) {
goto end;
if (!g_hash_table_lookup_extended(field_name_to_index,
GUINT_TO_POINTER(field_quark),
NULL, (gpointer *) &index)) {
- BT_LOGV("Invalid parameter: no such field in structure field's type: "
+ BT_LOGT("Invalid parameter: no such field in structure field's type: "
"struct-field-addr=%p, struct-ft-addr=%p, name=\"%s\"",
field, field->type, name);
goto error;
BT_CTF_FIELD_TYPE_ID_STRING, "Field");
/* Make sure no null bytes are appended */
- BT_CTF_ASSERT_PRE(memchr(value, '\0', length) == NULL,
+ BT_CTF_ASSERT_PRE(!memchr(value, '\0', length),
"String value to append contains a null character: "
"partial-value=\"%.32s\", length=%u", value, length);
struct bt_ctf_field *field);
static inline
-bt_bool bt_ctf_field_is_set_recursive(struct bt_ctf_field *field)
+bt_ctf_bool bt_ctf_field_is_set_recursive(struct bt_ctf_field *field)
{
return bt_ctf_field_common_is_set_recursive((void *) field);
}