Fix: CTF writer: make library have its own public `types.h`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Jul 2019 05:28:13 +0000 (01:28 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Jul 2019 15:25:15 +0000 (11:25 -0400)
This was overlooked when segregating the CTF writer library from the
Babeltrace library: CTF writer needs its own `bt_ctf_bool` type with its
own `BT_CTF_TRUE` and `BT_CTF_FALSE` definitions.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I4e6d0b2d0956479a554cc8358d646fc1676873f6
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1667
Tested-by: jenkins <jenkins@lttng.org>
21 files changed:
include/Makefile.am
include/babeltrace2/ctf-writer/clock-class.h
include/babeltrace2/ctf-writer/clock.h
include/babeltrace2/ctf-writer/field-types.h
include/babeltrace2/ctf-writer/types.h [new file with mode: 0644]
include/babeltrace2/ctf-writer/utils.h
src/ctf-writer/clock-class.c
src/ctf-writer/clock-class.h
src/ctf-writer/field-types.c
src/ctf-writer/field-types.h
src/ctf-writer/fields.c
src/ctf-writer/fields.h
src/ctf-writer/resolve.c
src/ctf-writer/stream.c
src/ctf-writer/trace.c
src/ctf-writer/trace.h
src/ctf-writer/utils.c
src/ctf-writer/values.c
src/ctf-writer/values.h
src/ctf-writer/writer.c
tests/plugins/src.ctf.fs/succeed/gen-trace-simple.c

index 325f96d8c47cb4765a9238bfead1eb731f30d7b2..95a3327e9f9bd965f5e343627ba7291f9892dc02 100644 (file)
@@ -34,6 +34,7 @@ babeltrace2ctfwriterinclude_HEADERS = \
        babeltrace2/ctf-writer/stream-class.h \
        babeltrace2/ctf-writer/stream.h \
        babeltrace2/ctf-writer/trace.h \
+       babeltrace2/ctf-writer/types.h \
        babeltrace2/ctf-writer/utils.h \
        babeltrace2/ctf-writer/visitor.h \
        babeltrace2/ctf-writer/writer.h
index d8b7b4e7270255f409fdcaedf9c80e53f55b1db4..081ffe81f8c12aab197a622402f4e2203927f593 100644 (file)
@@ -78,11 +78,11 @@ extern int bt_ctf_clock_class_get_offset_cycles(
 extern int bt_ctf_clock_class_set_offset_cycles(
                 struct bt_ctf_clock_class *clock_class, int64_t cycles);
 
-extern bt_bool bt_ctf_clock_class_is_absolute(
+extern bt_ctf_bool bt_ctf_clock_class_is_absolute(
                 struct bt_ctf_clock_class *clock_class);
 
 extern int bt_ctf_clock_class_set_is_absolute(
-                struct bt_ctf_clock_class *clock_class, bt_bool is_absolute);
+                struct bt_ctf_clock_class *clock_class, bt_ctf_bool is_absolute);
 
 extern const uint8_t *bt_ctf_clock_class_get_uuid(
                 struct bt_ctf_clock_class *clock_class);
index ccb1f26ba5e7dac24c27b3bd5177620f2bab6bfe..fa467755b958eccad6376d0857443c2b44ce72de 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <stdint.h>
 #include <babeltrace2/ctf-writer/object.h>
-#include <babeltrace2/types.h>
+#include <babeltrace2/ctf-writer/types.h>
 
 #ifdef __cplusplus
 extern "C" {
index bd0549e16663b5f082cc1310298b3fd6c13f83ac..6ca5d4e46b02bff059fbd9ab4c78808a1cc9ba00 100644 (file)
@@ -30,8 +30,7 @@
 
 #include <stdint.h>
 #include <stddef.h>
-
-#include <babeltrace2/types.h>
+#include <babeltrace2/ctf-writer/types.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -145,7 +144,7 @@ extern int bt_ctf_field_type_integer_get_size(
 extern int bt_ctf_field_type_integer_set_size(
                struct bt_ctf_field_type *int_field_type, unsigned int size);
 
-extern bt_bool bt_ctf_field_type_integer_is_signed(
+extern bt_ctf_bool bt_ctf_field_type_integer_is_signed(
                struct bt_ctf_field_type *int_field_type);
 
 /* Pre-2.0 CTF writer compatibility */
@@ -157,7 +156,7 @@ int bt_ctf_field_type_integer_get_signed(
 }
 
 extern int bt_ctf_field_type_integer_set_is_signed(
-               struct bt_ctf_field_type *int_field_type, bt_bool is_signed);
+               struct bt_ctf_field_type *int_field_type, bt_ctf_bool is_signed);
 
 /* Pre-2.0 CTF writer compatibility */
 static inline
@@ -165,7 +164,7 @@ int bt_ctf_field_type_integer_set_signed(
                struct bt_ctf_field_type *int_field_type, int is_signed)
 {
        return bt_ctf_field_type_integer_set_is_signed(int_field_type,
-               is_signed ? BT_TRUE : BT_FALSE);
+               is_signed ? BT_CTF_TRUE : BT_CTF_FALSE);
 }
 
 extern enum bt_ctf_integer_base bt_ctf_field_type_integer_get_base(
diff --git a/include/babeltrace2/ctf-writer/types.h b/include/babeltrace2/ctf-writer/types.h
new file mode 100644 (file)
index 0000000..f0e04f9
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef BABELTRACE2_CTF_WRITER_TYPES_H
+#define BABELTRACE2_CTF_WRITER_TYPES_H
+
+/*
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * The Common Trace Format (CTF) Specification is available at
+ * http://www.efficios.com/ctf
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// False boolean value for the #bt_ctf_bool type.
+#define BT_CTF_FALSE    0
+
+/// True boolean value for the #bt_ctf_bool type.
+#define BT_CTF_TRUE     1
+
+typedef int bt_ctf_bool;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE2_CTF_WRITER_TYPES_H */
index 416fb3b7e8ea024ba7895fa12ee4bf13ca036180..417e9d5b80eaab0d6b970027f585111dc7be21f4 100644 (file)
  * http://www.efficios.com/ctf
  */
 
-/* For bt_bool */
-#include <babeltrace2/types.h>
+/* For bt_ctf_bool */
+#include <babeltrace2/ctf-writer/types.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-extern bt_bool bt_ctf_identifier_is_valid(const char *identifier);
+extern bt_ctf_bool bt_ctf_identifier_is_valid(const char *identifier);
 
 static inline
 int bt_ctf_validate_identifier(const char *identifier)
index d186f89a67d4ab95a7660c2742cb17d4e242ff94..47c49baceeb5e1a7800cd07c8e947415e1f3fee8 100644 (file)
@@ -46,7 +46,7 @@ static
 void bt_ctf_clock_class_destroy(struct bt_ctf_object *obj);
 
 BT_HIDDEN
-bt_bool bt_ctf_clock_class_is_valid(struct bt_ctf_clock_class *clock_class)
+bt_ctf_bool bt_ctf_clock_class_is_valid(struct bt_ctf_clock_class *clock_class)
 {
        return clock_class && clock_class->name;
 }
@@ -412,7 +412,7 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_clock_class_is_absolute(struct bt_ctf_clock_class *clock_class)
+bt_ctf_bool bt_ctf_clock_class_is_absolute(struct bt_ctf_clock_class *clock_class)
 {
        int ret = -1;
 
@@ -428,7 +428,7 @@ end:
 
 BT_HIDDEN
 int bt_ctf_clock_class_set_is_absolute(struct bt_ctf_clock_class *clock_class,
-               bt_bool is_absolute)
+               bt_ctf_bool is_absolute)
 {
        int ret = 0;
 
index ec78f66bddc359569950bafe6f879177b92f82b1..14e0bd4781f6474734650668965059e499c6c66d 100644 (file)
@@ -28,7 +28,7 @@
 #include "common/macros.h"
 #include "object-pool.h"
 #include "common/uuid.h"
-#include <babeltrace2/types.h>
+#include <babeltrace2/ctf-writer/types.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <glib.h>
@@ -58,7 +58,7 @@ BT_HIDDEN
 void bt_ctf_clock_class_freeze(struct bt_ctf_clock_class *clock_class);
 
 BT_HIDDEN
-bt_bool bt_ctf_clock_class_is_valid(struct bt_ctf_clock_class *clock_class);
+bt_ctf_bool bt_ctf_clock_class_is_valid(struct bt_ctf_clock_class *clock_class);
 
 BT_HIDDEN
 int bt_ctf_clock_class_compare(struct bt_ctf_clock_class *clock_class_a,
@@ -105,11 +105,11 @@ BT_HIDDEN
 int bt_ctf_clock_class_set_offset_cycles(
                struct bt_ctf_clock_class *clock_class, int64_t cycles);
 BT_HIDDEN
-bt_bool bt_ctf_clock_class_is_absolute(
+bt_ctf_bool bt_ctf_clock_class_is_absolute(
                struct bt_ctf_clock_class *clock_class);
 BT_HIDDEN
 int bt_ctf_clock_class_set_is_absolute(
-               struct bt_ctf_clock_class *clock_class, bt_bool is_absolute);
+               struct bt_ctf_clock_class *clock_class, bt_ctf_bool is_absolute);
 BT_HIDDEN
 const uint8_t *bt_ctf_clock_class_get_uuid(
                struct bt_ctf_clock_class *clock_class);
index 535267d4b6b9aa44ad42024287e8715746ac58cb..c427ee4fd03c1837a970597d4d379316fe3d4fa0 100644 (file)
@@ -871,7 +871,7 @@ void bt_ctf_field_type_common_enumeration_set_range_overlap(
                                                        <= mapping[1]->range_end._signed
                                                && mapping[0]->range_end._signed
                                                        >= mapping[1]->range_start._signed) {
-                                       ft->has_overlapping_ranges = BT_TRUE;
+                                       ft->has_overlapping_ranges = BT_CTF_TRUE;
                                        goto end;
                                }
                        } else {
@@ -879,7 +879,7 @@ void bt_ctf_field_type_common_enumeration_set_range_overlap(
                                                        <= mapping[1]->range_end._unsigned
                                                && mapping[0]->range_end._unsigned
                                                        >= mapping[1]->range_start._unsigned) {
-                                       ft->has_overlapping_ranges = BT_TRUE;
+                                       ft->has_overlapping_ranges = BT_CTF_TRUE;
                                        goto end;
                                }
                        }
@@ -999,7 +999,7 @@ end:
 }
 
 static
-bt_bool bt_ctf_field_type_common_enumeration_has_overlapping_ranges(
+bt_ctf_bool bt_ctf_field_type_common_enumeration_has_overlapping_ranges(
                struct bt_ctf_field_type_common_enumeration *enum_ft)
 {
        if (!enum_ft->common.frozen) {
@@ -1133,7 +1133,7 @@ int bt_ctf_field_type_common_integer_get_size(struct bt_ctf_field_type_common *f
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_type_common_integer_is_signed(struct bt_ctf_field_type_common *ft)
+bt_ctf_bool bt_ctf_field_type_common_integer_is_signed(struct bt_ctf_field_type_common *ft)
 {
        struct bt_ctf_field_type_common_integer *int_ft = BT_CTF_FROM_COMMON(ft);
 
@@ -1145,7 +1145,7 @@ bt_bool bt_ctf_field_type_common_integer_is_signed(struct bt_ctf_field_type_comm
 
 BT_HIDDEN
 int bt_ctf_field_type_common_integer_set_is_signed(struct bt_ctf_field_type_common *ft,
-               bt_bool is_signed)
+               bt_ctf_bool is_signed)
 {
        int ret = 0;
        struct bt_ctf_field_type_common_integer *int_ft = BT_CTF_FROM_COMMON(ft);
@@ -4597,13 +4597,13 @@ int bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *ft)
        return bt_ctf_field_type_common_integer_get_size((void *) ft);
 }
 
-bt_bool bt_ctf_field_type_integer_is_signed(struct bt_ctf_field_type *ft)
+bt_ctf_bool bt_ctf_field_type_integer_is_signed(struct bt_ctf_field_type *ft)
 {
        return bt_ctf_field_type_common_integer_is_signed((void *) ft);
 }
 
 int bt_ctf_field_type_integer_set_is_signed(struct bt_ctf_field_type *ft,
-               bt_bool is_signed)
+               bt_ctf_bool is_signed)
 {
        return bt_ctf_field_type_common_integer_set_is_signed((void *) ft,
                is_signed);
index 89fbf97ed7b35ed23f8a608e4fe60c81f96f6bce..52118235628363572cbff23f78386c9c27750905 100644 (file)
@@ -32,7 +32,7 @@
 #include <stddef.h>
 
 #include <babeltrace2/ctf-writer/field-types.h>
-#include <babeltrace2/types.h>
+#include <babeltrace2/ctf-writer/types.h>
 
 #include "common/macros.h"
 
@@ -135,7 +135,7 @@ struct bt_ctf_field_type_common_integer {
        struct bt_ctf_clock_class *mapped_clock_class;
 
        enum bt_ctf_byte_order user_byte_order;
-       bt_bool is_signed;
+       bt_ctf_bool is_signed;
        unsigned int size;
        enum bt_ctf_integer_base base;
        enum bt_ctf_string_encoding encoding;
@@ -163,7 +163,7 @@ struct bt_ctf_field_type_common_enumeration {
        GPtrArray *entries;
 
        /* Only set during validation */
-       bt_bool has_overlapping_ranges;
+       bt_ctf_bool has_overlapping_ranges;
 };
 
 enum bt_ctf_field_type_enumeration_mapping_iterator_type {
@@ -394,11 +394,11 @@ BT_HIDDEN
 int bt_ctf_field_type_common_integer_get_size(struct bt_ctf_field_type_common *ft);
 
 BT_HIDDEN
-bt_bool bt_ctf_field_type_common_integer_is_signed(struct bt_ctf_field_type_common *ft);
+bt_ctf_bool bt_ctf_field_type_common_integer_is_signed(struct bt_ctf_field_type_common *ft);
 
 BT_HIDDEN
 int bt_ctf_field_type_common_integer_set_is_signed(struct bt_ctf_field_type_common *ft,
-               bt_bool is_signed);
+               bt_ctf_bool is_signed);
 
 BT_HIDDEN
 int bt_ctf_field_type_common_integer_set_size(struct bt_ctf_field_type_common *ft,
index 48c48a9ba40aa1955e0eadefc1ea351bda65180f..3909deb6a7fe6c72aef2b45275a09f3fd9bf3832 100644 (file)
@@ -564,16 +564,16 @@ end:
 }
 
 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)
 {
        return field && field->payload_set;
 }
 
 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_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        size_t i;
        struct bt_ctf_field_common_structure *structure = BT_CTF_FROM_COMMON(field);
 
@@ -592,10 +592,10 @@ end:
 }
 
 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)
 {
        struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
 
        BT_ASSERT(field);
 
@@ -608,10 +608,10 @@ bt_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common
 }
 
 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)
 {
        size_t i;
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_common_array *array = BT_CTF_FROM_COMMON(field);
 
        BT_ASSERT(field);
@@ -628,10 +628,10 @@ end:
 }
 
 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)
 {
        size_t i;
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_common_sequence *sequence = BT_CTF_FROM_COMMON(field);
 
        BT_ASSERT(field);
@@ -676,7 +676,7 @@ static
 int bt_ctf_field_enumeration_validate_recursive(struct bt_ctf_field_common *field);
 
 static
-bt_bool bt_ctf_field_enumeration_is_set_recursive(
+bt_ctf_bool bt_ctf_field_enumeration_is_set_recursive(
                struct bt_ctf_field_common *field);
 
 static
@@ -730,7 +730,7 @@ static
 int bt_ctf_field_variant_validate_recursive(struct bt_ctf_field_common *field);
 
 static
-bt_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field);
 
 static
 void bt_ctf_field_variant_reset_recursive(struct bt_ctf_field_common *field);
@@ -1235,7 +1235,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field,
        struct bt_ctf_field_type_common_variant *variant_ft;
        struct bt_ctf_field_type_common_enumeration *tag_ft;
        struct bt_ctf_field *current_field = NULL;
-       bt_bool is_signed;
+       bt_ctf_bool is_signed;
        uint64_t tag_uval;
        int ret;
 
@@ -1701,9 +1701,9 @@ int bt_ctf_field_enumeration_validate_recursive(struct bt_ctf_field_common *fiel
 }
 
 static
-bt_bool bt_ctf_field_enumeration_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_enumeration_is_set_recursive(struct bt_ctf_field_common *field)
 {
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_enumeration *enumeration = (void *) field;
 
        if (enumeration->container) {
@@ -1763,9 +1763,9 @@ end:
 }
 
 static
-bt_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field)
 {
-       bt_bool is_set;
+       bt_ctf_bool is_set;
        struct bt_ctf_field_variant *variant = (void *) field;
 
        if (variant->tag) {
index 3c3cff6676717d5f4f1b0d9b414321e98bf2e558..b2284996d68dd4bcc99a5d9d1cf2804152e08d49 100644 (file)
@@ -67,7 +67,7 @@ typedef void (*bt_ctf_field_common_method_set_is_frozen)(struct bt_ctf_field_com
 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 {
@@ -255,20 +255,20 @@ void _bt_ctf_field_common_set_is_frozen_recursive(struct bt_ctf_field_common *fi
                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
@@ -279,7 +279,7 @@ bt_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common
 #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
@@ -329,9 +329,9 @@ void _bt_ctf_field_common_set(struct bt_ctf_field_common *field, bool value)
 }
 
 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;
@@ -844,7 +844,7 @@ struct bt_ctf_field *bt_ctf_field_enumeration_borrow_container(
                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);
 }
index 0d5e1c5f40dc07470546d7877ff85553f5d8c564..bc6ede5fc95d1c782a4f7a60085c89050ffb0a73 100644 (file)
@@ -179,7 +179,7 @@ end:
  * Checks whether or not `stack` is empty.
  */
 static
-bt_bool type_stack_empty(type_stack *stack)
+bt_ctf_bool type_stack_empty(type_stack *stack)
 {
        return stack->len == 0;
 }
@@ -402,7 +402,7 @@ int ptokens_to_field_path(GList *ptokens, struct bt_ctf_field_path *field_path,
 {
        int ret = 0;
        GList *cur_ptoken = ptokens;
-       bt_bool first_level_done = BT_FALSE;
+       bt_ctf_bool first_level_done = BT_CTF_FALSE;
 
        /* Get our own reference */
        bt_ctf_object_get_ref(type);
@@ -445,7 +445,7 @@ int ptokens_to_field_path(GList *ptokens, struct bt_ctf_field_path *field_path,
 
                        /* Next path token */
                        cur_ptoken = g_list_next(cur_ptoken);
-                       first_level_done = BT_TRUE;
+                       first_level_done = BT_CTF_TRUE;
                }
 
                /* Create new field path entry */
@@ -558,7 +558,7 @@ int relative_ptokens_to_field_path(GList *ptokens,
                        int tail_field_path_len =
                                tail_field_path->indexes->len;
 
-                       while (BT_TRUE) {
+                       while (BT_CTF_TRUE) {
                                struct bt_ctf_field_type_common *cur_type =
                                        type_stack_at(ctx->type_stack, i)->type;
                                int index = type_stack_at(
@@ -842,7 +842,7 @@ int get_field_paths_lca_index(struct bt_ctf_field_path *field_path1,
        field_path1_len = field_path1->indexes->len;
        field_path2_len = field_path2->indexes->len;
 
-       while (BT_TRUE) {
+       while (BT_CTF_TRUE) {
                int target_index, ctx_index;
 
                if (lca_index == field_path2_len ||
index da1228d6b3b6fc8f1392fc2abe9e882653202fc3..7d371ffd97a234781331191b318068857b572cc2 100644 (file)
@@ -1872,7 +1872,7 @@ void bt_ctf_stream_destroy(struct bt_ctf_object *obj)
 
 static
 int _set_structure_field_integer(struct bt_ctf_field *structure, char *name,
-               uint64_t value, bt_bool force)
+               uint64_t value, bt_ctf_bool force)
 {
        int ret = 0;
        struct bt_ctf_field_type *field_type = NULL;
@@ -1937,7 +1937,7 @@ static
 int try_set_structure_field_integer(struct bt_ctf_field *structure, char *name,
                uint64_t value)
 {
-       return _set_structure_field_integer(structure, name, value, BT_FALSE);
+       return _set_structure_field_integer(structure, name, value, BT_CTF_FALSE);
 }
 
 struct bt_ctf_stream_class *bt_ctf_stream_get_class(
index f7ef692d13abf66be23ae43456253ec56dec6573..3e29ce7b761fe7bdb4a419be0913213f99825748 100644 (file)
@@ -205,7 +205,7 @@ int bt_ctf_trace_common_set_uuid(struct bt_ctf_trace_common *trace,
        }
 
        bt_uuid_copy(trace->uuid, uuid);
-       trace->uuid_set = BT_TRUE;
+       trace->uuid_set = BT_CTF_TRUE;
        BT_LOGT("Set trace's UUID: addr=%p, name=\"%s\", "
                "uuid=\"" BT_UUID_FMT "\"",
                trace, bt_ctf_trace_common_get_name(trace),
@@ -1256,7 +1256,7 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
+bt_ctf_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
                struct bt_ctf_clock_class *clock_class)
 {
        struct bt_ctf_search_query query = { .value = clock_class, .found = 0 };
index 231e97b0a26ce027908ad2f446129bbabc866802..cd724c6a2a7456dd6c0bf0168e12fa4dd0150141 100644 (file)
@@ -50,7 +50,7 @@ struct bt_ctf_trace_common {
        GString *name;
        int frozen;
        bt_uuid_t uuid;
-       bt_bool uuid_set;
+       bt_ctf_bool uuid_set;
        enum bt_ctf_byte_order native_byte_order;
        struct bt_ctf_private_value *environment;
        GPtrArray *clock_classes; /* Array of pointers to bt_ctf_clock_class */
@@ -67,7 +67,7 @@ struct bt_ctf_trace_common {
 };
 
 BT_HIDDEN
-bt_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
+bt_ctf_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
                struct bt_ctf_clock_class *clock_class);
 
 BT_HIDDEN
index 5ac824754772576fa97c174d64cde09fb59baba8..935bfa84ef38563805bd4d7b58387ae6594028a3 100644 (file)
@@ -82,29 +82,29 @@ void trace_finalize(void)
        }
 }
 
-bt_bool bt_ctf_identifier_is_valid(const char *identifier)
+bt_ctf_bool bt_ctf_identifier_is_valid(const char *identifier)
 {
-       bt_bool is_valid = BT_TRUE;
+       bt_ctf_bool is_valid = BT_CTF_TRUE;
        char *string = NULL;
        char *save_ptr, *token;
 
        if (!identifier) {
                BT_LOGT_STR("Invalid parameter: input string is NULL.");
-               is_valid = BT_FALSE;
+               is_valid = BT_CTF_FALSE;
                goto end;
        }
 
        try_init_reserved_keywords();
 
        if (identifier[0] == '\0') {
-               is_valid = BT_FALSE;
+               is_valid = BT_CTF_FALSE;
                goto end;
        }
 
        string = strdup(identifier);
        if (!string) {
                BT_LOGE("strdup() failed.");
-               is_valid = BT_FALSE;
+               is_valid = BT_CTF_FALSE;
                goto end;
        }
 
@@ -113,7 +113,7 @@ bt_bool bt_ctf_identifier_is_valid(const char *identifier)
                if (g_hash_table_lookup_extended(reserved_keywords_set,
                        GINT_TO_POINTER(g_quark_from_string(token)),
                        NULL, NULL)) {
-                       is_valid = BT_FALSE;
+                       is_valid = BT_CTF_FALSE;
                        goto end;
                }
 
index 643ba0bbdcd5680eb9056b798194bdb6c9f8fe0d..89a808d4e0e98c29eab045f0bca374f19547cb39 100644 (file)
@@ -63,7 +63,7 @@
 struct bt_ctf_value {
        struct bt_ctf_object base;
        enum bt_ctf_value_type type;
-       bt_bool frozen;
+       bt_ctf_bool frozen;
 };
 
 static
@@ -83,7 +83,7 @@ struct bt_ctf_value bt_ctf_value_null_instance = {
                .parent = NULL,
        },
        .type = BT_CTF_VALUE_TYPE_NULL,
-       .frozen = BT_TRUE,
+       .frozen = BT_CTF_TRUE,
 };
 
 struct bt_ctf_value *const bt_ctf_value_null = &bt_ctf_value_null_instance;
@@ -92,7 +92,7 @@ struct bt_ctf_private_value *const bt_ctf_private_value_null =
 
 struct bt_ctf_value_bool {
        struct bt_ctf_value base;
-       bt_bool value;
+       bt_ctf_bool value;
 };
 
 struct bt_ctf_value_integer {
@@ -316,19 +316,19 @@ struct bt_ctf_private_value *(* const copy_funcs[])(const struct bt_ctf_value *)
 };
 
 static
-bt_bool bt_ctf_value_null_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_null_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        /*
-        * Always BT_TRUE since bt_ctf_value_compare() already checks if both
+        * Always BT_CTF_TRUE since bt_ctf_value_compare() already checks if both
         * object_a and object_b have the same type, and in the case of
         * null value objects, they're always the same if it is so.
         */
-       return BT_TRUE;
+       return BT_CTF_TRUE;
 }
 
 static
-bt_bool bt_ctf_value_bool_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_bool_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        if (BT_CTF_VALUE_TO_BOOL(object_a)->value !=
@@ -337,14 +337,14 @@ bt_bool bt_ctf_value_bool_compare(const struct bt_ctf_value *object_a,
                        "bool-a-val=%d, bool-b-val=%d",
                        BT_CTF_VALUE_TO_BOOL(object_a)->value,
                        BT_CTF_VALUE_TO_BOOL(object_b)->value);
-               return BT_FALSE;
+               return BT_CTF_FALSE;
        }
 
-       return BT_TRUE;
+       return BT_CTF_TRUE;
 }
 
 static
-bt_bool bt_ctf_value_integer_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_integer_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        if (BT_CTF_VALUE_TO_INTEGER(object_a)->value !=
@@ -353,14 +353,14 @@ bt_bool bt_ctf_value_integer_compare(const struct bt_ctf_value *object_a,
                        "int-a-val=%" PRId64 ", int-b-val=%" PRId64,
                        BT_CTF_VALUE_TO_INTEGER(object_a)->value,
                        BT_CTF_VALUE_TO_INTEGER(object_b)->value);
-               return BT_FALSE;
+               return BT_CTF_FALSE;
        }
 
-       return BT_TRUE;
+       return BT_CTF_TRUE;
 }
 
 static
-bt_bool bt_ctf_value_real_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_real_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        if (BT_CTF_VALUE_TO_REAL(object_a)->value !=
@@ -369,14 +369,14 @@ bt_bool bt_ctf_value_real_compare(const struct bt_ctf_value *object_a,
                        "real-a-val=%f, real-b-val=%f",
                        BT_CTF_VALUE_TO_REAL(object_a)->value,
                        BT_CTF_VALUE_TO_REAL(object_b)->value);
-               return BT_FALSE;
+               return BT_CTF_FALSE;
        }
 
-       return BT_TRUE;
+       return BT_CTF_TRUE;
 }
 
 static
-bt_bool bt_ctf_value_string_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_string_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        if (strcmp(BT_CTF_VALUE_TO_STRING(object_a)->gstr->str,
@@ -385,18 +385,18 @@ bt_bool bt_ctf_value_string_compare(const struct bt_ctf_value *object_a,
                        "string-a-val=\"%s\", string-b-val=\"%s\"",
                        BT_CTF_VALUE_TO_STRING(object_a)->gstr->str,
                        BT_CTF_VALUE_TO_STRING(object_b)->gstr->str);
-               return BT_FALSE;
+               return BT_CTF_FALSE;
        }
 
-       return BT_TRUE;
+       return BT_CTF_TRUE;
 }
 
 static
-bt_bool bt_ctf_value_array_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_array_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
        int i;
-       bt_bool ret = BT_TRUE;
+       bt_ctf_bool ret = BT_CTF_TRUE;
        const struct bt_ctf_value_array *array_obj_a =
                BT_CTF_VALUE_TO_ARRAY(object_a);
 
@@ -408,7 +408,7 @@ bt_bool bt_ctf_value_array_compare(const struct bt_ctf_value *object_a,
                        object_a, object_b,
                        bt_ctf_value_array_get_size(object_a),
                        bt_ctf_value_array_get_size(object_b));
-               ret = BT_FALSE;
+               ret = BT_CTF_FALSE;
                goto end;
        }
 
@@ -425,7 +425,7 @@ bt_bool bt_ctf_value_array_compare(const struct bt_ctf_value *object_a,
                        BT_LOGT("Array values's elements are different: "
                                "value-a-addr=%p, value-b-addr=%p, index=%d",
                                element_obj_a, element_obj_b, i);
-                       ret = BT_FALSE;
+                       ret = BT_CTF_FALSE;
                        goto end;
                }
        }
@@ -435,10 +435,10 @@ end:
 }
 
 static
-bt_bool bt_ctf_value_map_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_map_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b)
 {
-       bt_bool ret = BT_TRUE;
+       bt_ctf_bool ret = BT_CTF_TRUE;
        GHashTableIter iter;
        gpointer key, element_obj_a;
        const struct bt_ctf_value_map *map_obj_a = BT_CTF_VALUE_TO_MAP(object_a);
@@ -451,7 +451,7 @@ bt_bool bt_ctf_value_map_compare(const struct bt_ctf_value *object_a,
                        object_a, object_b,
                        bt_ctf_value_map_get_size(object_a),
                        bt_ctf_value_map_get_size(object_b));
-               ret = BT_FALSE;
+               ret = BT_CTF_FALSE;
                goto end;
        }
 
@@ -468,7 +468,7 @@ bt_bool bt_ctf_value_map_compare(const struct bt_ctf_value *object_a,
                        BT_LOGT("Map values's elements are different: "
                                "value-a-addr=%p, value-b-addr=%p, key=\"%s\"",
                                element_obj_a, element_obj_b, key_str);
-                       ret = BT_FALSE;
+                       ret = BT_CTF_FALSE;
                        goto end;
                }
        }
@@ -478,7 +478,7 @@ end:
 }
 
 static
-bt_bool (* const compare_funcs[])(const struct bt_ctf_value *,
+bt_ctf_bool (* const compare_funcs[])(const struct bt_ctf_value *,
                const struct bt_ctf_value *) = {
        [BT_CTF_VALUE_TYPE_NULL] =              bt_ctf_value_null_compare,
        [BT_CTF_VALUE_TYPE_BOOL] =              bt_ctf_value_bool_compare,
@@ -497,7 +497,7 @@ void bt_ctf_value_null_freeze(struct bt_ctf_value *object)
 static
 void bt_ctf_value_generic_freeze(struct bt_ctf_value *object)
 {
-       object->frozen = BT_TRUE;
+       object->frozen = BT_CTF_TRUE;
 }
 
 static
@@ -592,13 +592,13 @@ struct bt_ctf_value bt_ctf_value_create_base(enum bt_ctf_value_type type)
        struct bt_ctf_value value;
 
        value.type = type;
-       value.frozen = BT_FALSE;
+       value.frozen = BT_CTF_FALSE;
        bt_ctf_object_init_shared(&value.base, bt_ctf_value_destroy);
        return value;
 }
 
 BT_HIDDEN
-struct bt_ctf_private_value *bt_ctf_private_value_bool_create_init(bt_bool val)
+struct bt_ctf_private_value *bt_ctf_private_value_bool_create_init(bt_ctf_bool val)
 {
        struct bt_ctf_value_bool *bool_obj;
 
@@ -620,7 +620,7 @@ end:
 BT_HIDDEN
 struct bt_ctf_private_value *bt_ctf_private_value_bool_create(void)
 {
-       return bt_ctf_private_value_bool_create_init(BT_FALSE);
+       return bt_ctf_private_value_bool_create_init(BT_CTF_FALSE);
 }
 
 BT_HIDDEN
@@ -775,7 +775,7 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_value_bool_get(const struct bt_ctf_value *bool_obj)
+bt_ctf_bool bt_ctf_value_bool_get(const struct bt_ctf_value *bool_obj)
 {
        BT_CTF_ASSERT_PRE_NON_NULL(bool_obj, "Value object");
        BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(bool_obj, BT_CTF_VALUE_TYPE_BOOL);
@@ -783,7 +783,7 @@ bt_bool bt_ctf_value_bool_get(const struct bt_ctf_value *bool_obj)
 }
 
 BT_HIDDEN
-void bt_ctf_private_value_bool_set(struct bt_ctf_private_value *bool_obj, bt_bool val)
+void bt_ctf_private_value_bool_set(struct bt_ctf_private_value *bool_obj, bt_ctf_bool val)
 {
        BT_CTF_ASSERT_PRE_NON_NULL(bool_obj, "Value object");
        BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(bool_obj, BT_CTF_VALUE_TYPE_BOOL);
@@ -907,7 +907,7 @@ enum bt_ctf_value_status bt_ctf_private_value_array_append_element(
 
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_array_append_bool_element(
-               struct bt_ctf_private_value *array_obj, bt_bool val)
+               struct bt_ctf_private_value *array_obj, bt_ctf_bool val)
 {
        enum bt_ctf_value_status ret;
        struct bt_ctf_private_value *bool_obj = NULL;
@@ -1039,7 +1039,7 @@ struct bt_ctf_private_value *bt_ctf_private_value_map_borrow_entry_value(
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_value_map_has_entry(const struct bt_ctf_value *map_obj, const char *key)
+bt_ctf_bool bt_ctf_value_map_has_entry(const struct bt_ctf_value *map_obj, const char *key)
 {
        BT_CTF_ASSERT_PRE_NON_NULL(map_obj, "Value object");
        BT_CTF_ASSERT_PRE_NON_NULL(key, "Key");
@@ -1069,7 +1069,7 @@ enum bt_ctf_value_status bt_ctf_private_value_map_insert_entry(
 
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_map_insert_bool_entry(
-               struct bt_ctf_private_value *map_obj, const char *key, bt_bool val)
+               struct bt_ctf_private_value *map_obj, const char *key, bt_ctf_bool val)
 {
        enum bt_ctf_value_status ret;
        struct bt_ctf_private_value *bool_obj = NULL;
@@ -1196,10 +1196,10 @@ struct extend_map_element_data {
 };
 
 static
-bt_bool extend_map_element(const char *key,
+bt_ctf_bool extend_map_element(const char *key,
                struct bt_ctf_value *extension_obj_elem, void *data)
 {
-       bt_bool ret = BT_TRUE;
+       bt_ctf_bool ret = BT_CTF_TRUE;
        struct extend_map_element_data *extend_data = data;
        struct bt_ctf_private_value *extension_obj_elem_copy = NULL;
 
@@ -1230,7 +1230,7 @@ bt_bool extend_map_element(const char *key,
 
 error:
        BT_ASSERT(extend_data->status != BT_CTF_VALUE_STATUS_OK);
-       ret = BT_FALSE;
+       ret = BT_CTF_FALSE;
 
 end:
        BT_CTF_OBJECT_PUT_REF_AND_RESET(extension_obj_elem_copy);
@@ -1322,10 +1322,10 @@ enum bt_ctf_value_status bt_ctf_value_copy(struct bt_ctf_private_value **copy_ob
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_value_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_compare(const struct bt_ctf_value *object_a,
        const struct bt_ctf_value *object_b)
 {
-       bt_bool ret = BT_FALSE;
+       bt_ctf_bool ret = BT_CTF_FALSE;
 
        BT_CTF_ASSERT_PRE_NON_NULL(object_a, "Value object A");
        BT_CTF_ASSERT_PRE_NON_NULL(object_b, "Value object B");
index 08b0fbcfca08e1440f4aea098ffe834e18a2fe74..990376666262116be2870140418f382ab8263e9c 100644 (file)
@@ -24,7 +24,7 @@
  * SOFTWARE.
  */
 
-#include <babeltrace2/types.h>
+#include <babeltrace2/ctf-writer/types.h>
 
 #include "common/macros.h"
 
@@ -60,7 +60,7 @@ enum bt_ctf_value_type {
        /// Null value object.
        BT_CTF_VALUE_TYPE_NULL =                0,
 
-       /// Boolean value object (holds #BT_TRUE or #BT_FALSE).
+       /// Boolean value object (holds #BT_CTF_TRUE or #BT_CTF_FALSE).
        BT_CTF_VALUE_TYPE_BOOL =                1,
 
        /// Integer value object (holds a signed 64-bit integer raw value).
@@ -83,43 +83,43 @@ BT_HIDDEN
 enum bt_ctf_value_type bt_ctf_value_get_type(const struct bt_ctf_value *object);
 
 static inline
-bt_bool bt_ctf_value_is_null(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_null(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_NULL;
 }
 
 static inline
-bt_bool bt_ctf_value_is_bool(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_bool(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_BOOL;
 }
 
 static inline
-bt_bool bt_ctf_value_is_integer(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_integer(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_INTEGER;
 }
 
 static inline
-bt_bool bt_ctf_value_is_real(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_real(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_REAL;
 }
 
 static inline
-bt_bool bt_ctf_value_is_string(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_string(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_STRING;
 }
 
 static inline
-bt_bool bt_ctf_value_is_array(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_array(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_ARRAY;
 }
 
 static inline
-bt_bool bt_ctf_value_is_map(const struct bt_ctf_value *object)
+bt_ctf_bool bt_ctf_value_is_map(const struct bt_ctf_value *object)
 {
        return bt_ctf_value_get_type(object) == BT_CTF_VALUE_TYPE_MAP;
 }
@@ -129,11 +129,11 @@ enum bt_ctf_value_status bt_ctf_value_copy(struct bt_ctf_private_value **copy,
                const struct bt_ctf_value *object);
 
 BT_HIDDEN
-bt_bool bt_ctf_value_compare(const struct bt_ctf_value *object_a,
+bt_ctf_bool bt_ctf_value_compare(const struct bt_ctf_value *object_a,
                const struct bt_ctf_value *object_b);
 
 BT_HIDDEN
-bt_bool bt_ctf_value_bool_get(const struct bt_ctf_value *bool_obj);
+bt_ctf_bool bt_ctf_value_bool_get(const struct bt_ctf_value *bool_obj);
 
 BT_HIDDEN
 int64_t bt_ctf_value_integer_get(const struct bt_ctf_value *integer_obj);
@@ -148,7 +148,7 @@ BT_HIDDEN
 uint64_t bt_ctf_value_array_get_size(const struct bt_ctf_value *array_obj);
 
 static inline
-bt_bool bt_ctf_value_array_is_empty(const struct bt_ctf_value *array_obj)
+bt_ctf_bool bt_ctf_value_array_is_empty(const struct bt_ctf_value *array_obj)
 {
        return bt_ctf_value_array_get_size(array_obj) == 0;
 }
@@ -161,7 +161,7 @@ BT_HIDDEN
 uint64_t bt_ctf_value_map_get_size(const struct bt_ctf_value *map_obj);
 
 static inline
-bt_bool bt_ctf_value_map_is_empty(const struct bt_ctf_value *map_obj)
+bt_ctf_bool bt_ctf_value_map_is_empty(const struct bt_ctf_value *map_obj)
 {
        return bt_ctf_value_map_get_size(map_obj) == 0;
 }
@@ -170,7 +170,7 @@ BT_HIDDEN
 struct bt_ctf_value *bt_ctf_value_map_borrow_entry_value(
                const struct bt_ctf_value *map_obj, const char *key);
 
-typedef bt_bool (* bt_ctf_value_map_foreach_entry_cb)(const char *key,
+typedef bt_ctf_bool (* bt_ctf_value_map_foreach_entry_cb)(const char *key,
        struct bt_ctf_value *object, void *data);
 
 BT_HIDDEN
@@ -179,7 +179,7 @@ enum bt_ctf_value_status bt_ctf_value_map_foreach_entry(
                bt_ctf_value_map_foreach_entry_cb cb, void *data);
 
 BT_HIDDEN
-bt_bool bt_ctf_value_map_has_entry(const struct bt_ctf_value *map_obj,
+bt_ctf_bool bt_ctf_value_map_has_entry(const struct bt_ctf_value *map_obj,
                const char *key);
 
 BT_HIDDEN
@@ -205,11 +205,11 @@ BT_HIDDEN
 struct bt_ctf_private_value *bt_ctf_private_value_bool_create(void);
 
 BT_HIDDEN
-struct bt_ctf_private_value *bt_ctf_private_value_bool_create_init(bt_bool val);
+struct bt_ctf_private_value *bt_ctf_private_value_bool_create_init(bt_ctf_bool val);
 
 BT_HIDDEN
 void bt_ctf_private_value_bool_set(struct bt_ctf_private_value *bool_obj,
-               bt_bool val);
+               bt_ctf_bool val);
 
 BT_HIDDEN
 struct bt_ctf_private_value *bt_ctf_private_value_integer_create(void);
@@ -259,7 +259,7 @@ enum bt_ctf_value_status bt_ctf_private_value_array_append_element(
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_array_append_bool_element(
                struct bt_ctf_private_value *array_obj,
-               bt_bool val);
+               bt_ctf_bool val);
 
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_array_append_integer_element(
@@ -295,7 +295,7 @@ BT_HIDDEN
 struct bt_ctf_private_value *bt_ctf_private_value_map_borrow_entry_value(
                const struct bt_ctf_private_value *map_obj, const char *key);
 
-typedef bt_bool (* bt_ctf_private_value_map_foreach_entry_cb)(const char *key,
+typedef bt_ctf_bool (* bt_ctf_private_value_map_foreach_entry_cb)(const char *key,
                struct bt_ctf_private_value *object, void *data);
 
 BT_HIDDEN
@@ -310,7 +310,7 @@ enum bt_ctf_value_status bt_ctf_private_value_map_insert_entry(
 
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_map_insert_bool_entry(
-               struct bt_ctf_private_value *map_obj, const char *key, bt_bool val);
+               struct bt_ctf_private_value *map_obj, const char *key, bt_ctf_bool val);
 
 BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_map_insert_integer_entry(
index 650d68f30d6879a50016c517b9ca092e64aad604..a3d6f8b428934a41f13d2ba8da8f51a8e48bf8c5 100644 (file)
@@ -217,7 +217,7 @@ struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer,
 {
        struct bt_ctf_stream *stream = NULL;
        int stream_class_count;
-       bt_bool stream_class_found = BT_FALSE;
+       bt_ctf_bool stream_class_found = BT_CTF_FALSE;
        int i;
 
        if (!writer || !stream_class) {
@@ -236,7 +236,7 @@ struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer,
                                writer->trace, i);
 
                if (existing_stream_class == stream_class) {
-                       stream_class_found = BT_TRUE;
+                       stream_class_found = BT_CTF_TRUE;
                }
 
                BT_CTF_OBJECT_PUT_REF_AND_RESET(existing_stream_class);
index bcfddae48999ce9bfd4ff17af405858dfe9c1b8e..a7b9e9b63882e84136f1dead128ae6fc4a52a13f 100644 (file)
@@ -78,7 +78,7 @@ void configure_writer(struct config *cfg, const char *path)
        BT_ASSERT(cfg->ec);
        ft = bt_ctf_field_type_integer_create(8);
        BT_ASSERT(ft);
-       ret = bt_ctf_field_type_integer_set_is_signed(ft, BT_TRUE);
+       ret = bt_ctf_field_type_integer_set_is_signed(ft, BT_CTF_TRUE);
        BT_ASSERT(ret == 0);
        ret = bt_ctf_event_class_add_field(cfg->ec, ft, "first");
        BT_ASSERT(ret == 0);
This page took 0.046776 seconds and 4 git commands to generate.