.gitignore: add some more IDE / tools related file master
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 24 May 2024 16:40:53 +0000 (12:40 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 31 May 2024 19:56:29 +0000 (15:56 -0400)
Change-Id: I223c98e0b94dceb879dbf9273e7bc3c23e17f780
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12774
Tested-by: jenkins <jenkins@lttng.org>
215 files changed:
.gitignore
doc/api/libbabeltrace2/DoxygenLayout.xml
doc/api/libbabeltrace2/dox/api-fund.dox
doc/api/libbabeltrace2/dox/group-trace-ir.dox
doc/api/libbabeltrace2/dox/main-page.dox
include/babeltrace2-ctf-writer/object.h
include/babeltrace2/error-reporting.h
include/babeltrace2/graph/component-class-dev.h
include/babeltrace2/graph/component-class.h
include/babeltrace2/graph/message-iterator-class.h
include/babeltrace2/graph/message.h
include/babeltrace2/graph/private-query-executor.h
include/babeltrace2/graph/self-component-class.h
include/babeltrace2/plugin/plugin-dev.h
include/babeltrace2/util.h
include/babeltrace2/version.h
src/autodisc/autodisc.h
src/bindings/python/bt2/bt2/logging.h
src/bindings/python/bt2/bt2/native_bt_autodisc.i.h
src/bindings/python/bt2/bt2/native_bt_bt2_objects.h
src/bindings/python/bt2/bt2/native_bt_component_class.i.h
src/bindings/python/bt2/bt2/native_bt_error.i.h
src/bindings/python/bt2/bt2/native_bt_graph.i.h
src/bindings/python/bt2/bt2/native_bt_log_and_append_error.h
src/bindings/python/bt2/bt2/native_bt_message_iterator.i.h
src/bindings/python/bt2/bt2/native_bt_mip.i.h
src/bindings/python/bt2/bt2/native_bt_plugin.i.h
src/bindings/python/bt2/bt2/native_bt_query_exec.i.h
src/bindings/python/bt2/bt2/native_bt_trace.i.h
src/bindings/python/bt2/bt2/native_bt_trace_class.i.h
src/bindings/python/bt2/bt2/native_bt_value.i.h
src/cli/babeltrace2-cfg-cli-args-connect.h
src/cli/babeltrace2-cfg-cli-args-default.h
src/cli/babeltrace2-cfg-cli-args.h
src/cli/babeltrace2-cfg.h
src/cli/babeltrace2-log-level.h
src/cli/babeltrace2-plugins.h
src/cli/babeltrace2-query.h
src/cli/logging.h
src/clock-correlation-validator/clock-correlation-validator.h
src/clock-correlation-validator/clock-correlation-validator.hpp
src/common/align.h
src/common/assert.h
src/common/common.h
src/common/list.h
src/common/macros.h
src/common/mmap-align.h
src/common/prio-heap.c [deleted file]
src/common/prio-heap.h [deleted file]
src/common/safe.h
src/common/uuid.h
src/common/version.h
src/compat/bitfield.h
src/compat/compiler.h
src/compat/endian.h
src/compat/fcntl.h
src/compat/glib.h
src/compat/limits.h
src/compat/memstream.h
src/compat/mman.h
src/compat/stdio.h
src/compat/stdlib.h
src/compat/string.h
src/compat/time.h
src/compat/unistd.h
src/compat/utc.h
src/cpp-common/bt2/query-executor.hpp
src/cpp-common/bt2c/file-utils.hpp
src/cpp-common/bt2c/fmt.hpp
src/cpp-common/bt2c/logging.hpp
src/cpp-common/bt2c/vector.hpp
src/cpp-common/vendor/span-lite/span.hpp
src/ctf-writer/assert-pre.h
src/ctf-writer/clock-class.h
src/ctf-writer/clock.h
src/ctf-writer/event-class.h
src/ctf-writer/event.h
src/ctf-writer/field-path.h
src/ctf-writer/field-types.h
src/ctf-writer/field-wrapper.h
src/ctf-writer/fields.h
src/ctf-writer/functor.h
src/ctf-writer/object-pool.h
src/ctf-writer/object.h
src/ctf-writer/resolve.h
src/ctf-writer/stream-class.h
src/ctf-writer/stream.h
src/ctf-writer/trace.h
src/ctf-writer/utils.h
src/ctf-writer/validation.h
src/ctf-writer/values.h
src/ctf-writer/visitor.h
src/ctf-writer/writer.h
src/ctfser/ctfser.h
src/fd-cache/fd-cache.h
src/lib/assert-cond-base.h
src/lib/assert-cond.h
src/lib/error.h
src/lib/func-status.h
src/lib/graph/component-class-sink-simple.h
src/lib/graph/component-class.h
src/lib/graph/component-descriptor-set.h
src/lib/graph/component-filter.h
src/lib/graph/component-sink.h
src/lib/graph/component-source.h
src/lib/graph/component.h
src/lib/graph/connection.h
src/lib/graph/graph.h
src/lib/graph/interrupter.h
src/lib/graph/iterator.h
src/lib/graph/message-iterator-class.h
src/lib/graph/message/discarded-items.h
src/lib/graph/message/event.h
src/lib/graph/message/message-iterator-inactivity.h
src/lib/graph/message/message.h
src/lib/graph/message/packet.h
src/lib/graph/message/stream.h
src/lib/graph/port.h
src/lib/graph/query-executor.h
src/lib/integer-range-set.h
src/lib/lib-logging.c
src/lib/logging.h
src/lib/object-pool.h
src/lib/object.h
src/lib/plugin/plugin-so.h
src/lib/plugin/plugin.h
src/lib/property.h
src/lib/trace-ir/attributes.h
src/lib/trace-ir/clock-class.c
src/lib/trace-ir/clock-class.h
src/lib/trace-ir/clock-snapshot.h
src/lib/trace-ir/event-class.c
src/lib/trace-ir/event-class.h
src/lib/trace-ir/event.h
src/lib/trace-ir/field-class.h
src/lib/trace-ir/field-path.h
src/lib/trace-ir/field-wrapper.h
src/lib/trace-ir/field.h
src/lib/trace-ir/packet.h
src/lib/trace-ir/resolve-field-path.h
src/lib/trace-ir/stream-class.c
src/lib/trace-ir/stream-class.h
src/lib/trace-ir/stream.c
src/lib/trace-ir/stream.h
src/lib/trace-ir/trace-class.h
src/lib/trace-ir/trace.c
src/lib/trace-ir/trace.h
src/lib/trace-ir/utils.h
src/lib/value.h
src/param-parse/param-parse.h
src/plugins/common/muxing/muxing.h
src/plugins/common/param-validation/param-validation.h
src/plugins/ctf/common/src/bfcr/bfcr.hpp
src/plugins/ctf/common/src/clk-cls-cfg.hpp
src/plugins/ctf/common/src/metadata/tsdl/ast.hpp
src/plugins/ctf/common/src/metadata/tsdl/ctf-meta-configure-ir-trace.hpp
src/plugins/ctf/common/src/metadata/tsdl/ctf-meta-visitors.hpp
src/plugins/ctf/common/src/metadata/tsdl/ctf-meta.hpp
src/plugins/ctf/common/src/metadata/tsdl/decoder-packetized-file-stream-to-buf.hpp
src/plugins/ctf/common/src/metadata/tsdl/decoder.hpp
src/plugins/ctf/common/src/metadata/tsdl/logging.hpp
src/plugins/ctf/common/src/metadata/tsdl/objstack.hpp
src/plugins/ctf/common/src/metadata/tsdl/parser-wrap.hpp
src/plugins/ctf/common/src/metadata/tsdl/scanner-symbols.hpp
src/plugins/ctf/common/src/metadata/tsdl/scanner.hpp
src/plugins/ctf/common/src/msg-iter/msg-iter.hpp
src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp
src/plugins/ctf/fs-sink/fs-sink-stream.hpp
src/plugins/ctf/fs-sink/fs-sink-trace.hpp
src/plugins/ctf/fs-sink/fs-sink.hpp
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp
src/plugins/ctf/fs-src/data-stream-file.hpp
src/plugins/ctf/fs-src/file.hpp
src/plugins/ctf/fs-src/fs.hpp
src/plugins/ctf/fs-src/lttng-index.hpp
src/plugins/ctf/fs-src/metadata.hpp
src/plugins/ctf/fs-src/query.cpp
src/plugins/ctf/fs-src/query.hpp
src/plugins/ctf/lttng-live/data-stream.hpp
src/plugins/ctf/lttng-live/lttng-live.hpp
src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp
src/plugins/ctf/lttng-live/metadata.hpp
src/plugins/ctf/lttng-live/viewer-connection.hpp
src/plugins/lttng-utils/debug-info/bin-info.h
src/plugins/lttng-utils/debug-info/crc32.h
src/plugins/lttng-utils/debug-info/debug-info.h
src/plugins/lttng-utils/debug-info/dwarf.h
src/plugins/lttng-utils/debug-info/trace-ir-data-copy.h
src/plugins/lttng-utils/debug-info/trace-ir-mapping.h
src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.h
src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h
src/plugins/lttng-utils/debug-info/utils.h
src/plugins/text/dmesg/dmesg.h
src/plugins/text/pretty/pretty.h
src/plugins/utils/counter/counter.h
src/plugins/utils/dummy/dummy.h
src/plugins/utils/muxer/upstream-msg-iter.hpp
src/plugins/utils/trimmer/trimmer.h
src/py-common/py-common.h
src/python-plugin-provider/python-plugin-provider.h
src/string-format/format-error.h
src/string-format/format-plugin-comp-cls-name.h
tests/data/plugins/flt.lttng-utils.debug-info/libhello.h
tests/lib/conds/clk-cls-compat-postconds-triggers.cpp
tests/lib/conds/clk-cls-compat-postconds-triggers.hpp
tests/lib/conds/utils.hpp
tests/lib/utils/run-in.hpp
tests/plugins/flt.utils.muxer/test-clock-compatibility.cpp
tests/plugins/src.ctf.fs/field/test-field.sh
tests/utils/common.h
tests/utils/utils.sh
tools/check-include-guard.py [new file with mode: 0755]
tools/check-include-guards.sh [new file with mode: 0755]
tools/format-cpp.sh

index 904372ce0b567c0dc3f0c8ca094d891d06ba8b9b..fe091c0019f7c3195fdb0586faac311e4906e1f5 100644 (file)
@@ -80,8 +80,11 @@ __pycache__
 *.swp
 *~
 .cache/
 *.swp
 *~
 .cache/
+.clangd
 .coverage
 .coverage
+.gdb_history
 .theia
 .theia
+.vscode
 compile_commands.json
 cscope*
 htmlcov/
 compile_commands.json
 cscope*
 htmlcov/
index 7e40db87279f183ba8698d29a8b4ec172e357d3a..0ceb53cafbb995dc5c07b767ffa81db0ff66434d 100644 (file)
@@ -6,7 +6,9 @@
     <tab type="user" visible="yes" url="@ref examples" title="Examples"/>
     <tab type="pages" visible="yes" title="All pages" intro=""/>
     <tab type="modules" visible="yes" title="API reference"
     <tab type="user" visible="yes" url="@ref examples" title="Examples"/>
     <tab type="pages" visible="yes" title="All pages" intro=""/>
     <tab type="modules" visible="yes" title="API reference"
-      intro="List of all API reference modules:"/>
+      intro="List of all API reference pages:"/>
+    <tab type="topics" visible="yes" title="API reference"
+      intro="List of all API reference pages:"/>
   </navindex>
 
   <group>
   </navindex>
 
   <group>
index 5b24faf4e3c2b76fdf3d3fe0f5a1a57dbf304484..8f742e73f042431ec40b9a8dd814a2622efc64e8 100644 (file)
@@ -35,7 +35,7 @@ that it meets its
 when it returns.
 
 The function descriptions in the
 when it returns.
 
 The function descriptions in the
-<a class="el" href="modules.html">API reference modules</a>
+<a class="el" href="topics.html">API reference</a>
 list all their preconditions and postconditions, if any.
 
 The libbabeltrace2 public functions offer a
 list all their preconditions and postconditions, if any.
 
 The libbabeltrace2 public functions offer a
@@ -126,7 +126,7 @@ object type A inherits an object type B, then you can use both the A and
 B API functions with an object of type A. For example, because an
 \bt_enum_fc \em is conceptually an \bt_int_fc, you can use any integer
 field class function with an enumeration field class.
 B API functions with an object of type A. For example, because an
 \bt_enum_fc \em is conceptually an \bt_int_fc, you can use any integer
 field class function with an enumeration field class.
-The <a class="el" href="modules.html">API reference modules</a> always
+The <a class="el" href="topics.html">API reference pages</a> always
 indicate the inheritance relations.
 
 @subsection api-fund-object-shared-unique Shared vs. unique objects
 indicate the inheritance relations.
 
 @subsection api-fund-object-shared-unique Shared vs. unique objects
@@ -199,7 +199,7 @@ Some \bt_name objects are \em shared while some others are \em unique:
 
     Because you cannot get a new unique object reference, you \em must
     ensure that you own the unique object's owner to keep it alive. The
 
     Because you cannot get a new unique object reference, you \em must
     ensure that you own the unique object's owner to keep it alive. The
-    <a class="el" href="modules.html">API reference modules</a> make it
+    <a class="el" href="topics.html">API reference pages</a> make it
     clear, depending on the context, which
     shared object is the ultimate owner of a given unique object.
 
     clear, depending on the context, which
     shared object is the ultimate owner of a given unique object.
 
@@ -212,7 +212,7 @@ Some \bt_name objects are \em shared while some others are \em unique:
   </dd>
 </dl>
 
   </dd>
 </dl>
 
-In the <a class="el" href="modules.html">API reference</a>, each module
+In the <a class="el" href="topics.html">API reference</a>, each page
 indicates whether the documented objects are shared or unique.
 
 @subsection api-fund-freezing Object freezing
 indicates whether the documented objects are shared or unique.
 
 @subsection api-fund-freezing Object freezing
@@ -233,7 +233,7 @@ When an object becomes frozen, its contained objects, if any, also
 become frozen, recursively.
 
 There's no function to check whether or not a given object is frozen.
 become frozen, recursively.
 
 There's no function to check whether or not a given object is frozen.
-Because the <a class="el" href="modules.html">API reference modules</a>
+Because the <a class="el" href="topics.html">API reference pages</a>
 document which functions freeze which objects,
 the "frozen" property is only useful for libbabeltrace2 to catch
 programming errors (\ref api-fund-pre-post "precondition checks").
 document which functions freeze which objects,
 the "frozen" property is only useful for libbabeltrace2 to catch
 programming errors (\ref api-fund-pre-post "precondition checks").
@@ -264,7 +264,7 @@ be contained in some collection. For example, all \bt_val objects have
 the type #bt_value because an \bt_array_val can contain different
 types of values. You must be careful to only call the functions which
 apply to a specific type of such objects.
 the type #bt_value because an \bt_array_val can contain different
 types of values. You must be careful to only call the functions which
 apply to a specific type of such objects.
-The <a class="el" href="modules.html">API reference modules</a> make
+The <a class="el" href="topics.html">API reference pages</a> make
 this clear in the precondition section. Such objects always have a
 <code>*_get_type()</code> function to get the object's exact type
 enumerator. For example, bt_value_get_type() returns the type enumerator
 this clear in the precondition section. Such objects always have a
 <code>*_get_type()</code> function to get the object's exact type
 enumerator. For example, bt_value_get_type() returns the type enumerator
@@ -374,7 +374,7 @@ if (status != BT_VALUE_COPY_STATUS_OK) {
 }
 @endcode
 
 }
 @endcode
 
-The <a class="el" href="modules.html">API reference modules</a>
+The <a class="el" href="topics.html">API reference pages</a>
 document, for each function, what each return status enumerator means.
 
 Some functions return properties or objects by output parameter. When
 document, for each function, what each return status enumerator means.
 
 Some functions return properties or objects by output parameter. When
index db258057ce58fbb1a6e6d25582f80ee2aa5e2a09..5aef881b4e0ae36c73c6cc1da571e03b6123a701 100644 (file)
@@ -8,8 +8,8 @@
     domain objects and concepts (contents of \bt_p_msg).
 
 The \bt_name
     domain objects and concepts (contents of \bt_p_msg).
 
 The \bt_name
-<strong><em>trace IR</em></strong> (intermediate representation) modules
-contain everything you need to represent tracing domain concepts and
+<strong><em>trace IR</em></strong> (intermediate representation) API
+offers everything you need to represent tracing domain concepts and
 objects so that many \bt_p_comp, written by different authors, can
 exchange trace metadata and data.
 
 objects so that many \bt_p_comp, written by different authors, can
 exchange trace metadata and data.
 
index 22c1e5d38a6bec6d705eee1a341706bdfa4daa34..d5a096c11a4fb9bff3b79b22f802296a17293caf 100644 (file)
@@ -112,13 +112,13 @@ to learn even more about the \bt_name project and its core concepts.
     parts of the API to accomplish real tasks.
   </dd>
 
     parts of the API to accomplish real tasks.
   </dd>
 
-  <dt><a class="el" href="modules.html">API reference</a></dt>
+  <dt><a class="el" href="topics.html">API reference</a></dt>
   <dd>
     Documents all the \bt_name C functions, definitions, macros,
     enumerators, and types.
 
   <dd>
     Documents all the \bt_name C functions, definitions, macros,
     enumerators, and types.
 
-    Each documentation module describes its API thoroughly and how it's
-    related to other modules.
+    Each page describes its API thoroughly and how it's
+    related to other APIs.
   </dd>
 </dl>
 */
   </dd>
 </dl>
 */
index 9767eb3ef83be723d3cc82dbd806676dcb0947b8..0191b34b3e601ff6c03cb99b74ed8d6e00b6eed0 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
 #include <babeltrace2-ctf-writer/object.h>
 @endcode
 
 #include <babeltrace2-ctf-writer/object.h>
 @endcode
 
-The macros and functions of this module are everything that is needed
+The macros and functions of this API are everything that is needed
 to handle the <strong><em>reference counting</em></strong> of
 Babeltrace objects.
 
 to handle the <strong><em>reference counting</em></strong> of
 Babeltrace objects.
 
index 29e53e16b5d3b18fff9973855823d9f1b47bc57d..0a257d19340afab9c6fb182595db6e2a9218129c 100644 (file)
@@ -28,8 +28,8 @@ extern "C" {
 @brief
     Error reporting functions and macros.
 
 @brief
     Error reporting functions and macros.
 
-This module contains functions and macros to report rich errors from a
-user function (a \bt_comp_cls method, a
+This API offers functions and macros to report rich
+errors from a user function (a \bt_comp_cls method, a
 \ref api-qexec "query operation", or a trace processing \bt_graph
 listener, for example) to any function caller.
 
 \ref api-qexec "query operation", or a trace processing \bt_graph
 listener, for example) to any function caller.
 
index 7267e62f1fe95df1ff69f3f7c315083bf2b49570..7e59f6655cafde816834153107fa5f05fb719335 100644 (file)
@@ -32,11 +32,11 @@ A <strong><em>component class</em></strong> is the class of a \bt_comp:
 @image html component.png
 
 @attention
 @image html component.png
 
 @attention
-    This module (component class development API) offers functions to
+    This API (component class development API) offers functions to
     programmatically create component classes. To get the properties of
     an existing component class, see \ref api-comp-cls.
 
     programmatically create component classes. To get the properties of
     an existing component class, see \ref api-comp-cls.
 
-A component class has <em>methods</em>. This module essentially
+A component class has <em>methods</em>. This API essentially
 offers:
 
 - Component class method type definitions.
 offers:
 
 - Component class method type definitions.
@@ -84,7 +84,7 @@ See \ref api-comp-cls-dev-methods "Methods" to learn more about the
 different types of component class methods.
 
 A component class is a \ref api-fund-shared-object "shared object": see
 different types of component class methods.
 
 A component class is a \ref api-fund-shared-object "shared object": see
-the \ref api-comp-cls module for the reference count functions.
+the \ref api-comp-cls API for the reference count functions.
 
 Some library functions \ref api-fund-freezing "freeze" component classes
 on success. The documentation of those functions indicate this
 
 Some library functions \ref api-fund-freezing "freeze" component classes
 on success. The documentation of those functions indicate this
index 4fe692f2c88110a112ad9abfe82252253131e0fb..64bccf3b048d731f95fcb8a8e5b023931e4f781e 100644 (file)
@@ -31,9 +31,9 @@ A <strong><em>component class</em></strong> is the class of a \bt_comp:
 @image html component.png
 
 @attention
 @image html component.png
 
 @attention
-    This module (component class API) offers basic, read-only functions
-    to get component class properties. To \em create a component class,
-    see \ref api-comp-cls-dev or \ref api-plugin-dev.
+    This API (component class API) offers basic,
+    read-only functions to get component class properties. To \em create
+    a component class, see \ref api-comp-cls-dev or \ref api-plugin-dev.
 
 You can instantiate a given component class many times, with different
 initialization parameters, to create many components with the
 
 You can instantiate a given component class many times, with different
 initialization parameters, to create many components with the
index 82ee1f2d6e4cdb579f1859d1c3977526fe06a146..b7ddf89ace35eea51acb9895a81af8a45ec40cbb 100644 (file)
@@ -39,8 +39,8 @@ pass it to bt_component_class_source_create() or
 bt_component_class_filter_create() to set it as the created component
 class's message iterator class.
 
 bt_component_class_filter_create() to set it as the created component
 class's message iterator class.
 
-A message iterator class has <em>methods</em>. This module essentially
-offers:
+A message iterator class has <em>methods</em>. This API
+essentially offers:
 
 - Message iterator class method type definitions.
 
 
 - Message iterator class method type definitions.
 
index a73d6e1cc240d7053e0af421d32d9d902e992c9f..f634f888fc7bc3bf1a5b249bb054d576a021afb9 100644 (file)
@@ -848,7 +848,7 @@ version as rarely as possible. When it is required, though, it's a
 welcome tool to make the project evolve gracefully.
 
 The Message Interchange Protocol has no dedicated documentation as this
 welcome tool to make the project evolve gracefully.
 
 The Message Interchange Protocol has no dedicated documentation as this
-very message module (and its submodules, like \ref api-tir)
+very message API (and its contained APIs, like \ref api-tir)
 documentation is enough. You can consider that all the
 functions of the message and trace IR objects have an implicit MIP
 version \ref api-fund-pre-post "precondition". When a given
 documentation is enough. You can consider that all the
 functions of the message and trace IR objects have an implicit MIP
 version \ref api-fund-pre-post "precondition". When a given
index 81a0daeb0cdf863d9db8a60a3752bf5556e7d669..7598f5397e4c893d072dcfa1521d35d1a8e82cbb 100644 (file)
@@ -35,7 +35,7 @@ from within a \bt_comp_cls
 A query method receives a private query executor as its
 \bt_p{query_executor} parameter.
 
 A query method receives a private query executor as its
 \bt_p{query_executor} parameter.
 
-As of \bt_name_version_min_maj, this module only offers the
+As of \bt_name_version_min_maj, this API only offers the
 bt_private_query_executor_as_query_executor_const() function to
 \ref api-fund-c-typing "upcast" a private query executor to a
 \c const query executor. You need this to get the query executor's
 bt_private_query_executor_as_query_executor_const() function to
 \ref api-fund-c-typing "upcast" a private query executor to a
 \c const query executor. You need this to get the query executor's
index 366f7146f26388a26c578588ddbac6f9a8b1a949..c07480596329c785ba12342af20d7448a962ab14 100644 (file)
@@ -31,9 +31,9 @@ The #bt_self_component_class, #bt_self_component_class_source,
 private views of a \bt_comp_cls from within a component class
 \ref api-comp-cls-dev-class-meth "class method".
 
 private views of a \bt_comp_cls from within a component class
 \ref api-comp-cls-dev-class-meth "class method".
 
-As of \bt_name_version_min_maj, this module only contains functions
-to \ref api-fund-c-typing "upcast" the "self" (private) types to their
-public #bt_component_class, #bt_component_class_source,
+As of \bt_name_version_min_maj, this API only offers
+functions to \ref api-fund-c-typing "upcast" the "self" (private) types
+to their public #bt_component_class, #bt_component_class_source,
 #bt_component_class_filter, and #bt_component_class_sink counterparts.
 */
 
 #bt_component_class_filter, and #bt_component_class_sink counterparts.
 */
 
index 42420d8e2da5da937ccb3415471900a5c666aff5..e5760598badeaa7f3b2c717bd6934a8317123c7c 100644 (file)
@@ -49,13 +49,14 @@ extern "C" {
 @brief
     Shared object plugin development.
 
 @brief
     Shared object plugin development.
 
-This module offers macros to create a \bt_name shared object plugin.
+This API offers macros to create a \bt_name shared
+object plugin.
 
 
-Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
-create and fill global tables which are located in sections of the
-shared object with specific names. The \ref api-plugin functions can
-load the resulting shared object file and create corresponding
-\bt_plugin objects.
+Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this
+API create and fill global tables which are located in
+sections of the shared object with specific names. The \ref api-plugin
+functions can load the resulting shared object file and create
+corresponding \bt_plugin objects.
 
 See \ref guide-comp-link-plugin-so.
 
 
 See \ref guide-comp-link-plugin-so.
 
@@ -192,7 +193,7 @@ You can repeat steps 5 to 7 to add more than one component class to a
 given plugin.
 
 See \ref example-simple-plugin-def-file for a concrete example of how
 given plugin.
 
 See \ref example-simple-plugin-def-file for a concrete example of how
-to use the macros of this module.
+to use the macros of this API.
 
 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
 
 
 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
 
index 80c0e66bde5e4bf5820310c072dff3a8485b79c9..030862ae2b9b2b50178108d03f76cd4b1d319c44 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
 @brief
     General purpose utilities.
 
 @brief
     General purpose utilities.
 
-This module contains general purpose utilities.
+This API offers general purpose utilities.
 */
 
 /*! @{ */
 */
 
 /*! @{ */
index 66ad5415d07fd5c7b3d55ae6561649dc9a22873d..0f9506001cf83117efd46556dbf9a865274384df 100644 (file)
@@ -23,8 +23,8 @@ extern "C" {
 @brief
     Library version getters.
 
 @brief
     Library version getters.
 
-This module contains functions to get information about the library's
-version:
+This API offers functions to get information about the
+library's version:
 
 <dl>
   <dt>Major version</dt>
 
 <dl>
   <dt>Major version</dt>
index a038794950d698f6fcdbc1d1eec985b0f93ae469..6a51111cd156653faadbebd6c9c24ec29a96ca99 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2019 EfficiOS Inc. and Linux Foundation
  */
 
  * Copyright (C) 2019 EfficiOS Inc. and Linux Foundation
  */
 
-#ifndef AUTODISC_AUTODISC_H
-#define AUTODISC_AUTODISC_H
+#ifndef BABELTRACE_AUTODISC_AUTODISC_H
+#define BABELTRACE_AUTODISC_AUTODISC_H
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -71,4 +71,4 @@ auto_source_discovery_status auto_discover_source_components(
                struct auto_source_discovery *auto_disc,
                const bt_interrupter *interrupter);
 
                struct auto_source_discovery *auto_disc,
                const bt_interrupter *interrupter);
 
-#endif /* AUTODISC_AUTODISC_H */
+#endif /* BABELTRACE_AUTODISC_AUTODISC_H */
index 360f253ae663d9c9ddfcb4670eca46a77ee3a8f7..9a4efebcdf18c7f9643a6e382d82071bf00bed00 100644 (file)
@@ -4,12 +4,12 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_LOGGING_H
-#define BABELTRACE_BINDINGS_PYTHON_BT2_LOGGING_H
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_LOGGING_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_LOGGING_H
 
 #define BT_LOG_OUTPUT_LEVEL bt_python_bindings_bt2_log_level
 #include "logging/log.h"
 
 BT_LOG_LEVEL_EXTERN_SYMBOL(bt_python_bindings_bt2_log_level);
 
 
 #define BT_LOG_OUTPUT_LEVEL bt_python_bindings_bt2_log_level
 #include "logging/log.h"
 
 BT_LOG_LEVEL_EXTERN_SYMBOL(bt_python_bindings_bt2_log_level);
 
-#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_LOGGING_H */
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_LOGGING_H */
index 9b12e8c368a333199fcf7be6aff13694584b667e..f1629efb957d2b6264e5bb3c13df8839d25967c4 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_AUTODISC_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_AUTODISC_I_H
+
 #include <autodisc/autodisc.h>
 #include <common/common.h>
 
 #include <autodisc/autodisc.h>
 #include <common/common.h>
 
@@ -209,3 +212,5 @@ end:
 
        return result;
 }
 
        return result;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_AUTODISC_I_H */
index eedd97c125b6519e87d4acabc94ad427f533effd..9a47849e2dfa009f129a011e2de6c11cee9ec603 100644 (file)
@@ -4,8 +4,10 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include "logging/comp-logging.h"
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_BT2_OBJECTS_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_BT2_OBJECTS_H
 
 
+#include "logging/comp-logging.h"
 
 /*
  * Useful Python objects.
 
 /*
  * Useful Python objects.
@@ -70,3 +72,5 @@ void bt_bt2_exit_handler(void)
        Py_XDECREF(py_mod_bt2_exc_stop_type);
        Py_XDECREF(py_mod_bt2_exc_unknown_object_type);
 }
        Py_XDECREF(py_mod_bt2_exc_stop_type);
        Py_XDECREF(py_mod_bt2_exc_unknown_object_type);
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_BT2_OBJECTS_H */
index 628d58679b90f54349fa207e9ed25d2e641e3ec2..de11581adf2cafb3fc0e485641e0e6bd9c83e043 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_COMPONENT_CLASS_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_COMPONENT_CLASS_I_H
+
 #include "logging/comp-logging.h"
 #include "compat/glib.h"
 
 #include "logging/comp-logging.h"
 #include "compat/glib.h"
 
@@ -1524,3 +1527,5 @@ bt_component_class_sink *bt_bt2_component_class_sink_create(
 end:
        return component_class_sink;
 }
 end:
        return component_class_sink;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_COMPONENT_CLASS_I_H */
index 78eeb28ae5e9d39a8c1aecb724e0544bf8e5e61e..5e542d17ed577444eb095d9412e6cb9216de6f6c 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2019 Efficios, Inc.
  */
 
  * Copyright (c) 2019 Efficios, Inc.
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_ERROR_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_ERROR_I_H
+
 #include <string-format/format-error.h>
 
 static
 #include <string-format/format-error.h>
 
 static
@@ -41,3 +44,5 @@ PyObject *bt_bt2_format_bt_error(const bt_error *error)
 
        return py_error_str;
 }
 
        return py_error_str;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_ERROR_I_H */
index 41569f3d6a4ae0cb0b1e4e6c1675b37e9174e29b..8831e21ad7667c1445b6dfe449bf0d8f2d252e18 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_GRAPH_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_GRAPH_I_H
+
 static bt_graph_listener_func_status port_added_listener(
        const void *component,
        swig_type_info *component_swig_type,
 static bt_graph_listener_func_status port_added_listener(
        const void *component,
        swig_type_info *component_swig_type,
@@ -257,3 +260,5 @@ bt_bt2_graph_add_sink_component(
                component_class, name, params, obj == Py_None ? NULL : obj,
                log_level, component);
 }
                component_class, name, params, obj == Py_None ? NULL : obj,
                log_level, component);
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_GRAPH_I_H */
index 84c6717273e292d2c844feb5ede871197a18eb5b..2205772f989d4fd156ba30d286940b92dad489c3 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_LOG_AND_APPEND_ERROR_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_LOG_AND_APPEND_ERROR_H
+
 #include <stdbool.h>
 
 #include "logging/comp-logging.h"
 #include <stdbool.h>
 
 #include "logging/comp-logging.h"
@@ -249,3 +252,5 @@ void logw_exception_clear(int active_log_level)
                false, NULL, NULL, NULL, NULL);
        PyErr_Clear();
 }
                false, NULL, NULL, NULL, NULL);
        PyErr_Clear();
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_LOG_AND_APPEND_ERROR_H */
index 35c2612aac07409c38fc480c276af78f587d26e2..aaa88fca8a8b893455458bd8909062f25051fa75 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MESSAGE_ITERATOR_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MESSAGE_ITERATOR_I_H
+
 static
 bt_message_iterator_create_from_message_iterator_status
 bt_bt2_message_iterator_create_from_message_iterator(
 static
 bt_message_iterator_create_from_message_iterator_status
 bt_bt2_message_iterator_create_from_message_iterator(
@@ -116,3 +119,5 @@ static PyObject *bt_bt2_self_component_port_input_get_msg_range(
                &messages, &message_count);
        return get_msg_range_common(status, messages, message_count);
 }
                &messages, &message_count);
        return get_msg_range_common(status, messages, message_count);
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MESSAGE_ITERATOR_I_H */
index 1fa7c3fe42efc12a1650399bd40f3211e9ac7a39..9e64084c3f6e523a683729a6d7b2449a6bc63e6e 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MIP_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MIP_I_H
+
 static
 bt_component_descriptor_set_add_descriptor_status
 bt_bt2_component_descriptor_set_add_descriptor_with_initialize_method_data(
 static
 bt_component_descriptor_set_add_descriptor_status
 bt_bt2_component_descriptor_set_add_descriptor_with_initialize_method_data(
@@ -14,3 +17,5 @@ bt_bt2_component_descriptor_set_add_descriptor_with_initialize_method_data(
        return bt_component_descriptor_set_add_descriptor_with_initialize_method_data(
                comp_descr_set, comp_cls, params, obj == Py_None ? NULL : obj);
 }
        return bt_component_descriptor_set_add_descriptor_with_initialize_method_data(
                comp_descr_set, comp_cls, params, obj == Py_None ? NULL : obj);
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_MIP_I_H */
index 105fafc7da1061afda800a3c5ca3ae2fd032252d..1edf0813701454f3321ea074f18c81ff7e03e876 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_PLUGIN_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_PLUGIN_I_H
+
 /*
  * Those  bt_bt2_*() functions below ensure that when the API function
  * fails, the output parameter is set to `NULL`.  This is necessary
 /*
  * Those  bt_bt2_*() functions below ensure that when the API function
  * fails, the output parameter is set to `NULL`.  This is necessary
@@ -95,3 +98,5 @@ bt_plugin_find_all_from_dir_status bt_bt2_plugin_find_all_from_dir(
 
        return status;
 }
 
        return status;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_PLUGIN_I_H */
index 224b52a4383a8c6799fc032d21ac9161a0c2549f..9c26acff1b202e9db30a2d2f4ce7948c1f16ae52 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_QUERY_EXEC_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_QUERY_EXEC_I_H
+
 static
 bt_query_executor *bt_bt2_query_executor_create(
                const bt_component_class *component_class, const char *object,
 static
 bt_query_executor *bt_bt2_query_executor_create(
                const bt_component_class *component_class, const char *object,
@@ -12,3 +15,5 @@ bt_query_executor *bt_bt2_query_executor_create(
        return bt_query_executor_create_with_method_data(component_class,
                object, params, py_obj == Py_None ? NULL : py_obj);
 }
        return bt_query_executor_create_with_method_data(component_class,
                object, params, py_obj == Py_None ? NULL : py_obj);
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_QUERY_EXEC_I_H */
index 7d4c68825b3d0826631013c6f21fda18bfe1f78b..bccdf87584b757cb148e0702bb8331ec976aac7a 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_I_H
+
 static void
 trace_destroyed_listener(const bt_trace *trace, void *py_callable)
 {
 static void
 trace_destroyed_listener(const bt_trace *trace, void *py_callable)
 {
@@ -46,3 +49,5 @@ int bt_bt2_trace_add_destruction_listener(bt_trace *trace,
 
        return status;
 }
 
        return status;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_I_H */
index 68ea78c4a9113c69892d1f38a24de2ef88ee31df..201801da4b5f87836f932f69c022014a31a2b2aa 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_CLASS_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_CLASS_I_H
+
 static void
 trace_class_destroyed_listener(const bt_trace_class *trace_class, void *py_callable)
 {
 static void
 trace_class_destroyed_listener(const bt_trace_class *trace_class, void *py_callable)
 {
@@ -48,3 +51,5 @@ int bt_bt2_trace_class_add_destruction_listener(
 
        return status;
 }
 
        return status;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_TRACE_CLASS_I_H */
index ed1034a986225de9a4ec7fc418ead32b8c5b37d2..650515f3a7949edab58fc9de6f98651067568b7d 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
+#ifndef BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_VALUE_I_H
+#define BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_VALUE_I_H
+
 struct bt_value_map_get_keys_data {
        struct bt_value *keys;
 };
 struct bt_value_map_get_keys_data {
        struct bt_value *keys;
 };
@@ -46,3 +49,5 @@ error:
 end:
        return data.keys;
 }
 end:
        return data.keys;
 }
+
+#endif /* BABELTRACE_BINDINGS_PYTHON_BT2_BT2_NATIVE_BT_VALUE_I_H */
index 48a442e7ea26f5d531617dbe9dd990c6e5c182b1..2a8bf1cbdc352989393967d2bc15480b231e96ca 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CLI_BABELTRACE_CFG_CLI_ARGS_CONNECT_H
-#define CLI_BABELTRACE_CFG_CLI_ARGS_CONNECT_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_CONNECT_H
+#define BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_CONNECT_H
 
 #include <stdlib.h>
 #include <stdint.h>
 
 #include <stdlib.h>
 #include <stdint.h>
@@ -16,4 +16,4 @@ int bt_config_cli_args_create_connections(struct bt_config *cfg,
                const bt_value *connection_args,
                char *error_buf, size_t error_buf_size);
 
                const bt_value *connection_args,
                char *error_buf, size_t error_buf_size);
 
-#endif /* CLI_BABELTRACE_CFG_CLI_ARGS_CONNECT_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_CONNECT_H */
index 61927ba0d0113c6e1c67d2e17c55bb4356a1a9f9..d44915b975fd61a572d74092742c11ee99ee9f36 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace Trace Converter - Default Configuration
  */
 
  * Babeltrace Trace Converter - Default Configuration
  */
 
-#ifndef CLI_BABELTRACE_CFG_CLI_ARGS_DEFAULT_H
-#define CLI_BABELTRACE_CFG_CLI_ARGS_DEFAULT_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_DEFAULT_H
+#define BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_DEFAULT_H
 
 #include "babeltrace2-cfg.h"
 
 
 #include "babeltrace2-cfg.h"
 
@@ -15,4 +15,4 @@ enum bt_config_cli_args_status bt_config_cli_args_create_with_default(int argc,
                const char *argv[], struct bt_config **cfg,
                const bt_interrupter *interrupter);
 
                const char *argv[], struct bt_config **cfg,
                const bt_interrupter *interrupter);
 
-#endif /* CLI_BABELTRACE_CFG_CLI_ARGS_DEFAULT_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_DEFAULT_H */
index 1ceded7e56254f1cb76225ccbd904408eb74e206..2be129a2a77e520971baa2f392b26885a7471141 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CLI_BABELTRACE_CFG_CLI_ARGS_H
-#define CLI_BABELTRACE_CFG_CLI_ARGS_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_H
+#define BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_H
 
 #include <stdbool.h>
 #include <stdlib.h>
 
 #include <stdbool.h>
 #include <stdlib.h>
@@ -49,4 +49,4 @@ enum bt_config_cli_args_status bt_config_cli_args_create(int argc,
                const bt_value *initial_plugin_paths,
                const bt_interrupter *interrupter);
 
                const bt_value *initial_plugin_paths,
                const bt_interrupter *interrupter);
 
-#endif /* CLI_BABELTRACE_CFG_CLI_ARGS_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_CFG_CLI_ARGS_H */
index 79e1161064c44bc86ddc7b5a7323a2a3b2fe9a5f..81db306a075a1110a4481556d8b0151625614dee 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace trace converter - CLI tool's configuration
  */
 
  * Babeltrace trace converter - CLI tool's configuration
  */
 
-#ifndef CLI_BABELTRACE_CFG_H
-#define CLI_BABELTRACE_CFG_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_CFG_H
+#define BABELTRACE_CLI_BABELTRACE2_CFG_H
 
 #include <stdlib.h>
 #include <stdint.h>
 
 #include <stdlib.h>
 #include <stdint.h>
@@ -120,4 +120,4 @@ int bt_config_append_plugin_paths(bt_value *plugin_paths,
 
 void bt_config_connection_destroy(struct bt_config_connection *connection);
 
 
 void bt_config_connection_destroy(struct bt_config_connection *connection);
 
-#endif /* CLI_BABELTRACE_CFG_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_CFG_H */
index 66fe1038f954c28023413b1d9e7a0647a3fdd96e..d1e81432a05fa52bcda9b8b1cdbce0e04f45535f 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CLI_BABELTRACE_LOG_LEVEL_H
-#define CLI_BABELTRACE_LOG_LEVEL_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_LOG_LEVEL_H
+#define BABELTRACE_CLI_BABELTRACE2_LOG_LEVEL_H
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -31,4 +31,4 @@ int logging_level_min(int a, int b)
 
 void set_auto_log_levels(int *logging_level);
 
 
 void set_auto_log_levels(int *logging_level);
 
-#endif /* CLI_BABELTRACE_LOG_LEVEL_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_LOG_LEVEL_H */
index c95eda90bbbcf45b59c36b13cbebf5e3e0b8b6a8..2ddf9768b64e0b14fe8e90c6bd78b7156e38482b 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace trace converter - CLI tool's configuration
  */
 
  * Babeltrace trace converter - CLI tool's configuration
  */
 
-#ifndef CLI_BABELTRACE_PLUGINS_H
-#define CLI_BABELTRACE_PLUGINS_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_PLUGINS_H
+#define BABELTRACE_CLI_BABELTRACE2_PLUGINS_H
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -23,4 +23,4 @@ const bt_plugin *borrow_loaded_plugin_by_index(size_t index);
 const bt_plugin *borrow_loaded_plugin_by_name(const char *name);
 
 
 const bt_plugin *borrow_loaded_plugin_by_name(const char *name);
 
 
-#endif /* CLI_BABELTRACE_PLUGINS_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_PLUGINS_H */
index c128bb6cac287b78c66fa486335fd973c03a9822..86fa8ea2fa581af88facdab093b1d4cd5a00e415 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016-2019 EfficiOS Inc.
  */
 
  * Copyright 2016-2019 EfficiOS Inc.
  */
 
-#ifndef CLI_BABELTRACE_QUERY_H
-#define CLI_BABELTRACE_QUERY_H
+#ifndef BABELTRACE_CLI_BABELTRACE2_QUERY_H
+#define BABELTRACE_CLI_BABELTRACE2_QUERY_H
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -15,4 +15,4 @@ bt_query_executor_query_status cli_query(const bt_component_class *comp_cls,
                bt_logging_level log_level, const bt_interrupter *interrupter,
                const bt_value **user_result, const char **fail_reason);
 
                bt_logging_level log_level, const bt_interrupter *interrupter,
                const bt_value **user_result, const char **fail_reason);
 
-#endif /* CLI_BABELTRACE_QUERY_H */
+#endif /* BABELTRACE_CLI_BABELTRACE2_QUERY_H */
index 967b2382824167b931235efc0cc9631495c0576c..9df7660c5e8d530f7b107f68a02f3f30ae5ad330 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CLI_LOGGING_H
-#define CLI_LOGGING_H
+#ifndef BABELTRACE_CLI_LOGGING_H
+#define BABELTRACE_CLI_LOGGING_H
 
 #define BT_LOG_OUTPUT_LEVEL bt_cli_log_level
 #include "logging/log.h"
 
 #define BT_LOG_OUTPUT_LEVEL bt_cli_log_level
 #include "logging/log.h"
@@ -24,4 +24,4 @@ BT_LOG_LEVEL_EXTERN_SYMBOL(bt_cli_log_level);
 #define BT_CLI_LOGW_APPEND_CAUSE(_fmt, ...)                            \
        BT_CLI_LOG_AND_APPEND(BT_LOG_WARNING, _fmt, ##__VA_ARGS__)
 
 #define BT_CLI_LOGW_APPEND_CAUSE(_fmt, ...)                            \
        BT_CLI_LOG_AND_APPEND(BT_LOG_WARNING, _fmt, ##__VA_ARGS__)
 
-#endif /* CLI_LOGGING_H */
+#endif /* BABELTRACE_CLI_LOGGING_H */
index 4ccb7598c4ec204649e06061edf24eec6b032cf0..20c1509ddb1feca9b891d08b5114bad3ed2b387a 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2024 EfficiOS, Inc.
  */
 
  * Copyright 2024 EfficiOS, Inc.
  */
 
-#ifndef CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
-#define CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
+#ifndef BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
+#define BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
 
 #include <glib.h>
 #include <stdbool.h>
 
 #include <glib.h>
 #include <stdbool.h>
@@ -51,4 +51,4 @@ void bt_clock_correlation_validator_destroy(
 } /* extern "C" */
 #endif
 
 } /* extern "C" */
 #endif
 
-#endif /* CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H */
+#endif /* BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H */
index 314551c3cd7cee53cd4b749a5397ced606fb2d59..94ca4e00ebf9ae7c41ddb51601b5c794b4014191 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2024 EfficiOS, Inc.
  */
 
  * Copyright 2024 EfficiOS, Inc.
  */
 
-#ifndef CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP
-#define CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP
+#ifndef BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP
+#define BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP
 
 #include "cpp-common/bt2/message.hpp"
 
 
 #include "cpp-common/bt2/message.hpp"
 
@@ -148,4 +148,4 @@ private:
 
 } /* namespace bt2ccv */
 
 
 } /* namespace bt2ccv */
 
-#endif /* CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP */
+#endif /* BABELTRACE_CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_HPP */
index 01004c67b3bbb4e67b76caf645a8186c11a55f87..bf8acd6e4aef1b300e8f18cc37741ff1b0627f0a 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_ALIGN_H
-#define _BABELTRACE_ALIGN_H
+#ifndef BABELTRACE_COMMON_ALIGN_H
+#define BABELTRACE_COMMON_ALIGN_H
 
 #include "compat/compiler.h"
 #include "compat/limits.h"
 
 #include "compat/compiler.h"
 #include "compat/limits.h"
@@ -19,4 +19,4 @@
                        ((__typeof__(p)) BT_ALIGN_FLOOR((unsigned long) (p), a))
 #define BT_IS_ALIGNED(x, a)    (((x) & ((__typeof__(x)) (a) - 1)) == 0)
 
                        ((__typeof__(p)) BT_ALIGN_FLOOR((unsigned long) (p), a))
 #define BT_IS_ALIGNED(x, a)    (((x) & ((__typeof__(x)) (a) - 1)) == 0)
 
-#endif /* _BABELTRACE_ALIGN_H */
+#endif /* BABELTRACE_COMMON_ALIGN_H */
index 52349e6404cd469865a3da837866110b75997305..a948525605522ca3965b42fee902e6167656d3c5 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_ASSERT_INTERNAL_H
-#define BABELTRACE_ASSERT_INTERNAL_H
+#ifndef BABELTRACE_COMMON_ASSERT_H
+#define BABELTRACE_COMMON_ASSERT_H
 
 #include <assert.h>
 #include <glib.h>
 
 #include <assert.h>
 #include <glib.h>
@@ -63,4 +63,4 @@ extern void bt_common_assert_failed(const char *file, int line,
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_ASSERT_INTERNAL_H */
+#endif /* BABELTRACE_COMMON_ASSERT_H */
index fd9da4e70f98a3430f6f9a44cfb751f31df28e1c..63b01cc9feddda198043be26d117ee3ca0e44ec5 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_COMMON_INTERNAL_H
-#define BABELTRACE_COMMON_INTERNAL_H
+#ifndef BABELTRACE_COMMON_COMMON_H
+#define BABELTRACE_COMMON_COMMON_H
 
 #include <errno.h>
 #include <glib.h>
 
 #include <errno.h>
 #include <glib.h>
@@ -781,4 +781,4 @@ const char *bt_common_message_type_string(enum bt_message_type type)
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_COMMON_INTERNAL_H */
+#endif /* BABELTRACE_COMMON_COMMON_H */
index fd1f471cbb210bd1870c59a0a09c26f60e4a86e3..1b9be5cc21169a27bb69630377bac2bb95b3d657 100644 (file)
@@ -6,8 +6,8 @@
  * Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
  */
 
  * Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
  */
 
-#ifndef _BT_LIST_H
-#define _BT_LIST_H     1
+#ifndef BABELTRACE_COMMON_LIST_H
+#define BABELTRACE_COMMON_LIST_H
 
 /* The definitions of this file are adopted from those which can be
    found in the Linux kernel headers to enable people familiar with
 
 /* The definitions of this file are adopted from those which can be
    found in the Linux kernel headers to enable people familiar with
@@ -163,4 +163,4 @@ static inline void bt_list_replace_init(struct bt_list_head *old,
 }
 #endif
 
 }
 #endif
 
-#endif /* _BT_LIST_H */
+#endif /* BABELTRACE_COMMON_LIST_H */
index 8120515c63fe5bbcd81672f8c7b4cf1df89d9ce8..8a518b0328219bf68c0dfc1944d67c916bc732d0 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_INTERNAL_H
-#define _BABELTRACE_INTERNAL_H
+#ifndef BABELTRACE_COMMON_MACROS_H
+#define BABELTRACE_COMMON_MACROS_H
 
 #ifdef __cplusplus
 extern "C" {
 
 #ifdef __cplusplus
 extern "C" {
@@ -45,29 +45,6 @@ extern "C" {
 #define BT_IF_DEV_MODE(txt)
 #endif
 
 #define BT_IF_DEV_MODE(txt)
 #endif
 
-/*
- * Yield `ref`'s value while setting `ref` to NULL.
- *
- * This can be used to give a strong reference to a callee:
- *
- *   add_foo_to_list(list, BT_MOVE_REF(foo));
- *
- * or in a simple assignment:
- *
- *   my_struct->foo = BT_MOVE_REF(foo);
- *
- * When moving a reference in a function call, the reference is given to the
- * callee even if that function call fails, so make sure the called function
- * is written accordingly.
- */
-
-#define BT_MOVE_REF(ref)               \
-       ({                              \
-               __typeof__(ref) _ref = ref;     \
-               ref = NULL;             \
-               _ref;                   \
-       })
-
 /* Wrapper for g_array_index that adds bound checking.  */
 #define bt_g_array_index(a, t, i)              \
        g_array_index((a), t, ({ BT_ASSERT_DBG((i) < (a)->len); (i); }))
 /* Wrapper for g_array_index that adds bound checking.  */
 #define bt_g_array_index(a, t, i)              \
        g_array_index((a), t, ({ BT_ASSERT_DBG((i) < (a)->len); (i); }))
@@ -119,4 +96,4 @@ extern "C" {
 }
 #endif
 
 }
 #endif
 
-#endif
+#endif /* BABELTRACE_COMMON_MACROS_H */
index 4d81b25714283a1959fecd41bb3524f2043c14ef..d4595dc5ab2765e1d8ca7947e65b74060089c320 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_MMAP_ALIGN_H
-#define _BABELTRACE_MMAP_ALIGN_H
+#ifndef BABELTRACE_COMMON_MMAP_ALIGN_H
+#define BABELTRACE_COMMON_MMAP_ALIGN_H
 
 #include "common/align.h"
 #include <stdlib.h>
 
 #include "common/align.h"
 #include <stdlib.h>
@@ -95,4 +95,4 @@ void mmap_align_set_addr(struct mmap_align_data *mma, void *addr)
        mma->addr = addr;
 }
 
        mma->addr = addr;
 }
 
-#endif /* _BABELTRACE_MMAP_ALIGN_H */
+#endif /* BABELTRACE_COMMON_MMAP_ALIGN_H */
diff --git a/src/common/prio-heap.c b/src/common/prio-heap.c
deleted file mode 100644 (file)
index 55ed5e8..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Static-sized priority heap containing pointers. Based on CLRS,
- * chapter 6.
- */
-
-#include "common/macros.h"
-#include "common/assert.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "common/prio-heap.h"
-
-#ifdef DEBUG_HEAP
-void check_heap(const struct ptr_heap *heap)
-{
-       size_t i;
-
-       if (!heap->len)
-               return;
-
-       for (i = 1; i < heap->len; i++)
-               BT_ASSERT_DBG(!heap->gt(heap->ptrs[i], heap->ptrs[0]));
-}
-#endif
-
-static
-size_t parent(size_t i)
-{
-       return (i - 1) >> 1;
-}
-
-static
-size_t left(size_t i)
-{
-       return (i << 1) + 1;
-}
-
-static
-size_t right(size_t i)
-{
-       return (i << 1) + 2;
-}
-
-/*
- * Copy of heap->ptrs pointer is invalid after heap_grow.
- */
-static
-int heap_grow(struct ptr_heap *heap, size_t new_len)
-{
-       void **new_ptrs;
-
-       if (G_LIKELY(heap->alloc_len >= new_len))
-               return 0;
-
-       heap->alloc_len = bt_max_t(size_t, new_len, heap->alloc_len << 1);
-       new_ptrs = calloc(heap->alloc_len, sizeof(void *));
-       if (G_UNLIKELY(!new_ptrs))
-               return -ENOMEM;
-       if (G_LIKELY(heap->ptrs))
-               memcpy(new_ptrs, heap->ptrs, heap->len * sizeof(void *));
-       free(heap->ptrs);
-       heap->ptrs = new_ptrs;
-       return 0;
-}
-
-static
-int heap_set_len(struct ptr_heap *heap, size_t new_len)
-{
-       int ret;
-
-       ret = heap_grow(heap, new_len);
-       if (G_UNLIKELY(ret))
-               return ret;
-       heap->len = new_len;
-       return 0;
-}
-
-int bt_heap_init(struct ptr_heap *heap, size_t alloc_len,
-             int gt(void *a, void *b))
-{
-       heap->ptrs = NULL;
-       heap->len = 0;
-       heap->alloc_len = 0;
-       heap->gt = gt;
-       /*
-        * Minimum size allocated is 1 entry to ensure memory allocation
-        * never fails within bt_heap_replace_max.
-        */
-       return heap_grow(heap, bt_max_t(size_t, 1, alloc_len));
-}
-
-void bt_heap_free(struct ptr_heap *heap)
-{
-       free(heap->ptrs);
-}
-
-static void heapify(struct ptr_heap *heap, size_t i)
-{
-       void **ptrs = heap->ptrs;
-       size_t l, r, largest;
-
-       for (;;) {
-               void *tmp;
-
-               l = left(i);
-               r = right(i);
-               if (l < heap->len && heap->gt(ptrs[l], ptrs[i]))
-                       largest = l;
-               else
-                       largest = i;
-               if (r < heap->len && heap->gt(ptrs[r], ptrs[largest]))
-                       largest = r;
-               if (G_UNLIKELY(largest == i))
-                       break;
-               tmp = ptrs[i];
-               ptrs[i] = ptrs[largest];
-               ptrs[largest] = tmp;
-               i = largest;
-       }
-       check_heap(heap);
-}
-
-void *bt_heap_replace_max(struct ptr_heap *heap, void *p)
-{
-       void *res;
-
-       if (G_UNLIKELY(!heap->len)) {
-               (void) heap_set_len(heap, 1);
-               heap->ptrs[0] = p;
-               check_heap(heap);
-               return NULL;
-       }
-
-       /* Replace the current max and heapify */
-       res = heap->ptrs[0];
-       heap->ptrs[0] = p;
-       heapify(heap, 0);
-       return res;
-}
-
-int bt_heap_insert(struct ptr_heap *heap, void *p)
-{
-       void **ptrs;
-       size_t pos;
-       int ret;
-
-       ret = heap_set_len(heap, heap->len + 1);
-       if (G_UNLIKELY(ret))
-               return ret;
-       ptrs = heap->ptrs;
-       pos = heap->len - 1;
-       while (pos > 0 && heap->gt(p, ptrs[parent(pos)])) {
-               /* Move parent down until we find the right spot */
-               ptrs[pos] = ptrs[parent(pos)];
-               pos = parent(pos);
-       }
-       ptrs[pos] = p;
-       check_heap(heap);
-       return 0;
-}
-
-void *bt_heap_remove(struct ptr_heap *heap)
-{
-       switch (heap->len) {
-       case 0:
-               return NULL;
-       case 1:
-               (void) heap_set_len(heap, 0);
-               return heap->ptrs[0];
-       }
-       /* Shrink, replace the current max by previous last entry and heapify */
-       heap_set_len(heap, heap->len - 1);
-       /* len changed. previous last entry is at heap->len */
-       return bt_heap_replace_max(heap, heap->ptrs[heap->len]);
-}
-
-void *bt_heap_cherrypick(struct ptr_heap *heap, void *p)
-{
-       size_t pos, len = heap->len;
-
-       for (pos = 0; pos < len; pos++)
-               if (G_UNLIKELY(heap->ptrs[pos] == p))
-                       goto found;
-       return NULL;
-found:
-       if (G_UNLIKELY(heap->len == 1)) {
-               (void) heap_set_len(heap, 0);
-               check_heap(heap);
-               return heap->ptrs[0];
-       }
-       /* Replace p with previous last entry and heapify. */
-       heap_set_len(heap, heap->len - 1);
-       /* len changed. previous last entry is at heap->len */
-       heap->ptrs[pos] = heap->ptrs[heap->len];
-       heapify(heap, pos);
-       return p;
-}
-
-int bt_heap_copy(struct ptr_heap *dst, struct ptr_heap *src)
-{
-       int ret;
-
-       ret = bt_heap_init(dst, src->alloc_len, src->gt);
-       if (ret < 0)
-               goto end;
-
-       ret = heap_set_len(dst, src->len);
-       if (ret < 0)
-               goto end;
-
-       memcpy(dst->ptrs, src->ptrs, src->len * sizeof(void *));
-
-end:
-       return ret;
-}
diff --git a/src/common/prio-heap.h b/src/common/prio-heap.h
deleted file mode 100644 (file)
index 7e56521..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Static-sized priority heap containing pointers. Based on CLRS,
- * chapter 6.
- */
-
-#ifndef BABELTRACE_COMMON_PRIO_HEAP_H
-#define BABELTRACE_COMMON_PRIO_HEAP_H
-
-#include <unistd.h>
-#include "common/macros.h"
-
-struct ptr_heap {
-       size_t len, alloc_len;
-       void **ptrs;
-       int (*gt)(void *a, void *b);
-};
-
-#ifdef DEBUG_HEAP
-void check_heap(const struct ptr_heap *heap);
-#else
-static inline
-void check_heap(const struct ptr_heap *heap __attribute__((unused)))
-{
-}
-#endif
-
-/**
- * bt_heap_maximum - return the largest element in the heap
- * @heap: the heap to be operated on
- *
- * Returns the largest element in the heap, without performing any modification
- * to the heap structure. Returns NULL if the heap is empty.
- */
-static inline void *bt_heap_maximum(const struct ptr_heap *heap)
-{
-       check_heap(heap);
-       return G_LIKELY(heap->len) ? heap->ptrs[0] : NULL;
-}
-
-/**
- * bt_heap_init - initialize the heap
- * @heap: the heap to initialize
- * @alloc_len: number of elements initially allocated
- * @gt: function to compare the elements
- *
- * Returns -ENOMEM if out of memory.
- */
-extern int bt_heap_init(struct ptr_heap *heap,
-                    size_t alloc_len,
-                    int gt(void *a, void *b));
-
-/**
- * bt_heap_free - free the heap
- * @heap: the heap to free
- */
-extern void bt_heap_free(struct ptr_heap *heap);
-
-/**
- * bt_heap_insert - insert an element into the heap
- * @heap: the heap to be operated on
- * @p: the element to add
- *
- * Insert an element into the heap.
- *
- * Returns -ENOMEM if out of memory.
- */
-extern int bt_heap_insert(struct ptr_heap *heap, void *p);
-
-/**
- * bt_heap_remove - remove the largest element from the heap
- * @heap: the heap to be operated on
- *
- * Returns the largest element in the heap. It removes this element from the
- * heap. Returns NULL if the heap is empty.
- */
-extern void *bt_heap_remove(struct ptr_heap *heap);
-
-/**
- * bt_heap_cherrypick - remove a given element from the heap
- * @heap: the heap to be operated on
- * @p: the element
- *
- * Remove the given element from the heap. Return the element if present, else
- * return NULL. This algorithm has a complexity of O(n), which is higher than
- * O(log(n)) provided by the rest of this API.
- */
-extern void *bt_heap_cherrypick(struct ptr_heap *heap, void *p);
-
-/**
- * bt_heap_replace_max - replace the the largest element from the heap
- * @heap: the heap to be operated on
- * @p: the pointer to be inserted as topmost element replacement
- *
- * Returns the largest element in the heap. It removes this element from the
- * heap. The heap is rebalanced only once after the insertion. Returns NULL if
- * the heap is empty.
- *
- * This is the equivalent of calling bt_heap_remove() and then bt_heap_insert(), but
- * it only rebalances the heap once. It never allocates memory.
- */
-extern void *bt_heap_replace_max(struct ptr_heap *heap, void *p);
-
-/**
- * bt_heap_copy - copy a heap
- * @dst: the destination heap (must be allocated)
- * @src: the source heap
- *
- * Returns -ENOMEM if out of memory.
- */
-extern int bt_heap_copy(struct ptr_heap *dst, struct ptr_heap *src);
-
-#endif /* BABELTRACE_COMMON_PRIO_HEAP_H */
index cb962c48065805fb9db5dbd5ce7daa9c6892bc30..8d742b2790cd5269a78dca3c108d5911e9f6ba98 100644 (file)
@@ -4,6 +4,9 @@
  * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
+#ifndef BABELTRACE_COMMON_SAFE_H
+#define BABELTRACE_COMMON_SAFE_H
+
 #include <stdbool.h>
 #include <stdint.h>
 
 #include <stdbool.h>
 #include <stdint.h>
 
@@ -46,3 +49,5 @@ bool bt_safe_to_add_uint64(uint64_t a, uint64_t b)
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* BABELTRACE_COMMON_SAFE_H */
index c8418a67e6273037f4ac13aa8aa048a922531e7e..1c656a94667e30c655e9bedadb80deff5fb3389b 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMMON_UUID_H
-#define _BABELTRACE_COMMON_UUID_H
+#ifndef BABELTRACE_COMMON_UUID_H
+#define BABELTRACE_COMMON_UUID_H
 
 #include <inttypes.h>
 #include <stdint.h>
 
 #include <inttypes.h>
 #include <stdint.h>
@@ -47,4 +47,4 @@ void bt_uuid_copy(bt_uuid_t uuid_dest, const bt_uuid_t uuid_src);
 }
 #endif
 
 }
 #endif
 
-#endif /* _BABELTRACE_COMMON_UUID_H */
+#endif /* BABELTRACE_COMMON_UUID_H */
index b9de46dd71902022c6d712c4e205976b019cd986..2fb6de39f32852537ab8aa951b477ffb8bdf4196 100644 (file)
@@ -4,9 +4,9 @@
  * Copyright (C) 2018 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2018 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef VERSION_H
-#define VERSION_H
+#ifndef BABELTRACE_COMMON_VERSION_H
+#define BABELTRACE_COMMON_VERSION_H
 
 #include "common/version.i"
 
 
 #include "common/version.i"
 
-#endif /* VERSION_H */
+#endif /* BABELTRACE_COMMON_VERSION_H */
index df67401d5e1c56d59d793907edb649f20727add9..022cb4cf1c2427c3e40fa8fe82238eb4365ba522 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2010-2019 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2010-2019 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_BITFIELD_H
-#define _BABELTRACE_BITFIELD_H
+#ifndef BABELTRACE_COMPAT_BITFIELD_H
+#define BABELTRACE_COMPAT_BITFIELD_H
 
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <stdbool.h>   /* C99 7.16 bool type */
 
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <stdbool.h>   /* C99 7.16 bool type */
@@ -506,4 +506,4 @@ do {                                                                        \
 
 #endif
 
 
 #endif
 
-#endif /* _BABELTRACE_BITFIELD_H */
+#endif /* BABELTRACE_COMPAT_BITFIELD_H */
index 90e80da89c097ee2132c94cf5080e99e08b9eb2a..94ebb2c0c3ed38e9c2cd2de0ab5d1823ff35dfcc 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPILER_H
-#define _BABELTRACE_COMPILER_H
+#ifndef BABELTRACE_COMPAT_COMPILER_H
+#define BABELTRACE_COMPAT_COMPILER_H
 
 #include <stddef.h>    /* for offsetof */
 
 
 #include <stddef.h>    /* for offsetof */
 
@@ -21,4 +21,4 @@
 
 #define BT_ARRAY_SIZE(arr)     (sizeof(arr) / sizeof((arr)[0]))
 
 
 #define BT_ARRAY_SIZE(arr)     (sizeof(arr) / sizeof((arr)[0]))
 
-#endif /* _BABELTRACE_COMPILER_H */
+#endif /* BABELTRACE_COMPAT_COMPILER_H */
index a1c0ab34c48a8d3934c8d5ab63ac39be1ecc8fa5..1de99d2d8b1b1168d1771bb7abea14ca036a0517 100644 (file)
@@ -6,8 +6,8 @@
  * endian.h compatibility layer.
  */
 
  * endian.h compatibility layer.
  */
 
-#ifndef _BABELTRACE_ENDIAN_H
-#define _BABELTRACE_ENDIAN_H
+#ifndef BABELTRACE_COMPAT_ENDIAN_H
+#define BABELTRACE_COMPAT_ENDIAN_H
 
 #ifdef __FreeBSD__
 #include <sys/endian.h>
 
 #ifdef __FreeBSD__
 #include <sys/endian.h>
 #endif /* __FLOAT_WORD_ORDER */
 #endif /* FLOAT_WORD_ORDER */
 
 #endif /* __FLOAT_WORD_ORDER */
 #endif /* FLOAT_WORD_ORDER */
 
-#endif /* _BABELTRACE_ENDIAN_H */
+#endif /* BABELTRACE_COMPAT_ENDIAN_H */
index e78b6d49d3846d3f928af9962980fc67c75734c9..f5b9bb345862a83143558e2b2f15d845cfe64bf7 100644 (file)
@@ -6,8 +6,8 @@
  * fcntl compatibility layer.
  */
 
  * fcntl compatibility layer.
  */
 
-#ifndef _BABELTRACE_COMPAT_FCNTL_H
-#define _BABELTRACE_COMPAT_FCNTL_H
+#ifndef BABELTRACE_COMPAT_FCNTL_H
+#define BABELTRACE_COMPAT_FCNTL_H
 
 #include "common/common.h"
 
 
 #include "common/common.h"
 
@@ -216,4 +216,4 @@ end:
 }
 #endif /* #else #ifdef BABELTRACE_HAVE_POSIX_FALLOCATE */
 
 }
 #endif /* #else #ifdef BABELTRACE_HAVE_POSIX_FALLOCATE */
 
-#endif /* _BABELTRACE_COMPAT_FCNTL_H */
+#endif /* BABELTRACE_COMPAT_FCNTL_H */
index ef17be6c3eff0c2bdb055d953d501c064b26f67c..5319fcb6425b1939176f684ebf465944e5001301 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_GLIB_H
-#define _BABELTRACE_COMPAT_GLIB_H
+#ifndef BABELTRACE_COMPAT_GLIB_H
+#define BABELTRACE_COMPAT_GLIB_H
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -59,4 +59,4 @@ end:
 }
 #endif
 
 }
 #endif
 
-#endif /* _BABELTRACE_COMPAT_GLIB_H */
+#endif /* BABELTRACE_COMPAT_GLIB_H */
index c51c29290de20ceaf97638b19da7e071e4597cf0..48c18e6861cad74fab6a15955f6200a8b578f24d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef _BABELTRACE_LIMITS_H
-#define _BABELTRACE_LIMITS_H
+#ifndef BABELTRACE_COMPAT_LIMITS_H
+#define BABELTRACE_COMPAT_LIMITS_H
 
 #include <limits.h>
 
 
 #include <limits.h>
 
@@ -34,4 +34,4 @@
 #define PATH_MAX 4096
 #endif /* __GNU__ */
 
 #define PATH_MAX 4096
 #endif /* __GNU__ */
 
-#endif /* _BABELTRACE_LIMITS_H */
+#endif /* BABELTRACE_COMPAT_LIMITS_H */
index 374a5e729a2a644058b6f8d6292ad534084023cb..b055b2e3ef44268fa5c46c3dd264d416ee26663e 100644 (file)
@@ -6,8 +6,8 @@
  * memstream compatibility layer.
  */
 
  * memstream compatibility layer.
  */
 
-#ifndef _BABELTRACE_FORMAT_CTF_MEMSTREAM_H
-#define _BABELTRACE_FORMAT_CTF_MEMSTREAM_H
+#ifndef BABELTRACE_COMPAT_MEMSTREAM_H
+#define BABELTRACE_COMPAT_MEMSTREAM_H
 
 #ifdef BABELTRACE_HAVE_FMEMOPEN
 #include <stdio.h>
 
 #ifdef BABELTRACE_HAVE_FMEMOPEN
 #include <stdio.h>
@@ -344,4 +344,4 @@ error_free:
 
 #endif /* BABELTRACE_HAVE_OPEN_MEMSTREAM */
 
 
 #endif /* BABELTRACE_HAVE_OPEN_MEMSTREAM */
 
-#endif /* _BABELTRACE_FORMAT_CTF_MEMSTREAM_H */
+#endif /* BABELTRACE_COMPAT_MEMSTREAM_H */
index 33febccbb1c1e760c601a821ed6d3522e9e2bebe..b33ca61169147c9375e9f8233ac0a60a833a5818 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2015-2016  Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2015-2016  Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_MMAN_H
-#define _BABELTRACE_COMPAT_MMAN_H
+#ifndef BABELTRACE_COMPAT_MMAN_H
+#define BABELTRACE_COMPAT_MMAN_H
 
 #ifdef __MINGW32__
 
 
 #ifdef __MINGW32__
 
@@ -76,4 +76,4 @@ size_t bt_mmap_get_offset_align_size(int log_level)
 # endif
 #endif
 
 # endif
 #endif
 
-#endif /* _BABELTRACE_COMPAT_MMAN_H */
+#endif /* BABELTRACE_COMPAT_MMAN_H */
index 076f43a95e189273d456a019e2ce75f9203e9b17..d0200226dd5d31cbedd94830100c414da1d77625 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_STDIO_H
-#define _BABELTRACE_COMPAT_STDIO_H
+#ifndef BABELTRACE_COMPAT_STDIO_H
+#define BABELTRACE_COMPAT_STDIO_H
 
 #include <stdio.h>
 #include <errno.h>
 
 #include <stdio.h>
 #include <errno.h>
@@ -109,4 +109,4 @@ ssize_t bt_getline(char **lineptr, size_t *n, FILE *stream)
        return linelen - 1;     /* Count don't include final \0. */
 }
 
        return linelen - 1;     /* Count don't include final \0. */
 }
 
-#endif /* _BABELTRACE_COMPAT_STDIO_H */
+#endif /* BABELTRACE_COMPAT_STDIO_H */
index a06844d559096dbaf157e7aa6d9e40ac1ef5eae2..02a5cd9d5cffe735a07f16ec1f3fdfa428bad059 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_STDLIB_H
-#define _BABELTRACE_COMPAT_STDLIB_H
+#ifndef BABELTRACE_COMPAT_STDLIB_H
+#define BABELTRACE_COMPAT_STDLIB_H
 
 /*
  * This compat wrapper can be removed and replaced by g_mkdtemp() when we bump
 
 /*
  * This compat wrapper can be removed and replaced by g_mkdtemp() when we bump
@@ -58,4 +58,4 @@ end:
 
 #endif
 
 
 #endif
 
-#endif /* _BABELTRACE_COMPAT_STDLIB_H */
+#endif /* BABELTRACE_COMPAT_STDLIB_H */
index a1503b2928f3d6bf28bebe1ed41091c05aced4bd..7a3a27ef5e87ae62498458b2438f0933b99cf798 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_STRING_H
-#define _BABELTRACE_COMPAT_STRING_H
+#ifndef BABELTRACE_COMPAT_STRING_H
+#define BABELTRACE_COMPAT_STRING_H
 
 #include <string.h>
 #include <stdlib.h>
 
 #include <string.h>
 #include <stdlib.h>
@@ -71,4 +71,4 @@ end:
 }
 #endif /* HAVE_STRNDUP */
 
 }
 #endif /* HAVE_STRNDUP */
 
-#endif /* _BABELTRACE_COMPAT_STRING_H */
+#endif /* BABELTRACE_COMPAT_STRING_H */
index 741725899fed8b8a2c0a283f4506374a0061d931..62982fc6902413ef78a88f0b8f7289e3166b541b 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (C) 2016 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2016 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_INCLUDE_COMPAT_TIME_H
-#define _BABELTRACE_INCLUDE_COMPAT_TIME_H
+#ifndef BABELTRACE_COMPAT_TIME_H
+#define BABELTRACE_COMPAT_TIME_H
 
 #include <time.h>
 #include <stdlib.h>
 
 #include <time.h>
 #include <stdlib.h>
@@ -78,4 +78,5 @@ struct tm *bt_localtime_r(const time_t *timep, struct tm *result)
 }
 
 #endif /* __MINGW32__ */
 }
 
 #endif /* __MINGW32__ */
-#endif /* _BABELTRACE_INCLUDE_COMPAT_TIME_H */
+
+#endif /* BABELTRACE_COMPAT_TIME_H */
index e517e4bc9e8e926c236ea92c0efb564ac3f6deb9..6aae01adfde3acd673355eb1ea5cfe893499ee89 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2016 Michael Jeanson <mjeanson@efficios.com>
  */
 
  * Copyright (C) 2016 Michael Jeanson <mjeanson@efficios.com>
  */
 
-#ifndef _BABELTRACE_COMPAT_UNISTD_H
-#define _BABELTRACE_COMPAT_UNISTD_H
+#ifndef BABELTRACE_COMPAT_UNISTD_H
+#define BABELTRACE_COMPAT_UNISTD_H
 
 #include <unistd.h>
 
 
 #include <unistd.h>
 
@@ -39,4 +39,5 @@ long bt_sysconf(int name)
 }
 
 #endif
 }
 
 #endif
-#endif /* _BABELTRACE_COMPAT_UNISTD_H */
+
+#endif /* BABELTRACE_COMPAT_UNISTD_H */
index 4154c3e8da37cc6521251835772524b78c8ad55a..da95d0a9bde70c5567ffe79f3313a88616f50676 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_UTC_H
-#define _BABELTRACE_UTC_H
+#ifndef BABELTRACE_COMPAT_UTC_H
+#define BABELTRACE_COMPAT_UTC_H
 
 #include <time.h>
 
 
 #include <time.h>
 
@@ -86,4 +86,4 @@ time_t bt_timegm(struct tm *tm)
 
 #endif
 
 
 #endif
 
-#endif /* _BABELTRACE_UTC_H */
+#endif /* BABELTRACE_COMPAT_UTC_H */
index 4b3fb264398506106f81e8e9cd5292c1d025ba32..b610b3fd9a7045b395fda0df2aea8a840157a819 100644 (file)
@@ -121,4 +121,4 @@ using ConstQueryExecutor = CommonQueryExecutor<const bt_query_executor>;
 
 } /* namespace bt2 */
 
 
 } /* namespace bt2 */
 
-#endif /* BABELTRACE_CPP_COMMON_BT2_QUERY_EXECUTOR_HPP  */
+#endif /* BABELTRACE_CPP_COMMON_BT2_QUERY_EXECUTOR_HPP */
index 9890f0a8e425e85d0955075afd6fec2c7bb7a064..17bbe8c3e6b430bf59a7e91f2909d67093b19caa 100644 (file)
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: MIT
  */
 
  * SPDX-License-Identifier: MIT
  */
 
-#ifndef BABELTRACE_CPP_COMMON_FILE_UTILS_HPP
-#define BABELTRACE_CPP_COMMON_FILE_UTILS_HPP
+#ifndef BABELTRACE_CPP_COMMON_BT2C_FILE_UTILS_HPP
+#define BABELTRACE_CPP_COMMON_BT2C_FILE_UTILS_HPP
 
 #include <cstdint>
 #include <vector>
 
 #include <cstdint>
 #include <vector>
@@ -19,4 +19,4 @@ std::vector<std::uint8_t> dataFromFile(const char *path);
 
 } /* namespace bt2c */
 
 
 } /* namespace bt2c */
 
-#endif /* BABELTRACE_CPP_COMMON_FILE_UTILS_HPP */
+#endif /* BABELTRACE_CPP_COMMON_BT2C_FILE_UTILS_HPP */
index a78d7a61af83f37bb7f5b4c96c0035b568401908..f29a77a209484827ef0002c3e43494712e909e95 100644 (file)
@@ -4,6 +4,9 @@
  * SPDX-License-Identifier: MIT
  */
 
  * SPDX-License-Identifier: MIT
  */
 
+#ifndef BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+#define BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+
 #include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
 #include "cpp-common/vendor/wise-enum/wise_enum.h"
 
 #include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
 #include "cpp-common/vendor/wise-enum/wise_enum.h"
 
@@ -13,7 +16,7 @@ namespace internal {
 
 template <typename T>
 using EnableIfIsWiseEnum =
 
 template <typename T>
 using EnableIfIsWiseEnum =
-    typename std::enable_if<wise_enum::is_wise_enum<T>::value, const char *>::type;
+    typename std::enable_if<wise_enum::is_wise_enum<T>::value, wise_enum::string_type>::type;
 
 } /* namespace internal */
 
 
 } /* namespace internal */
 
@@ -41,3 +44,5 @@ inline std::string format_as(const UuidView uuid)
 }
 
 } /* namespace bt2c */
 }
 
 } /* namespace bt2c */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2C_FMT_HPP */
index 970ff9b77d85a8782e147b0a6884422995e9d981..f8140dde22df3661d1fdfa7584058dbe2fcff22f 100644 (file)
@@ -79,9 +79,8 @@ public:
      * `tag`.
      */
     explicit Logger(const bt2::SelfComponent selfComp, std::string tag) noexcept :
      * `tag`.
      */
     explicit Logger(const bt2::SelfComponent selfComp, std::string tag) noexcept :
-        _mSelfComp {selfComp}, _mLevel {static_cast<Level>(selfComp.loggingLevel())}, _mTag {
-                                                                                          std::move(
-                                                                                              tag)}
+        _mSelfComp {selfComp}, _mLevel {static_cast<Level>(selfComp.loggingLevel())},
+        _mTag {std::move(tag)}
     {
     }
 
     {
     }
 
@@ -142,8 +141,8 @@ public:
      */
     explicit Logger(const Logger& other, std::string newTag) :
         _mSelfCompCls {other._mSelfCompCls}, _mSelfComp {other._mSelfComp},
      */
     explicit Logger(const Logger& other, std::string newTag) :
         _mSelfCompCls {other._mSelfCompCls}, _mSelfComp {other._mSelfComp},
-        _mSelfMsgIter {other._mSelfMsgIter},
-        _mModuleName {other._mModuleName}, _mLevel {other._mLevel}, _mTag {std::move(newTag)}
+        _mSelfMsgIter {other._mSelfMsgIter}, _mModuleName {other._mModuleName},
+        _mLevel {other._mLevel}, _mTag {std::move(newTag)}
     {
     }
 
     {
     }
 
@@ -155,16 +154,6 @@ public:
         return _mLevel;
     }
 
         return _mLevel;
     }
 
-    /*
-     * Current logging level converted to a `bt_log_level` value.
-     *
-     * For legacy code.
-     */
-    bt_log_level cLevel() const noexcept
-    {
-        return static_cast<bt_log_level>(_mLevel);
-    }
-
     /*
      * Whether or not this logger would log at the level `level`.
      */
     /*
      * Whether or not this logger would log at the level `level`.
      */
@@ -285,10 +274,10 @@ public:
      */
     template <Level LevelV, bool AppendCauseV, typename... ArgTs>
     void log(const char * const fileName, const char * const funcName, const unsigned int lineNo,
      */
     template <Level LevelV, bool AppendCauseV, typename... ArgTs>
     void log(const char * const fileName, const char * const funcName, const unsigned int lineNo,
-             const char * const fmt, ArgTs&&...args) const
+             fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->_log<_StdLogWriter, LevelV, AppendCauseV>(fileName, funcName, lineNo, {}, "", fmt,
-                                                        std::forward<ArgTs>(args)...);
+        this->_log<_StdLogWriter, LevelV, AppendCauseV>(
+            fileName, funcName, lineNo, {}, "", std::move(fmt), std::forward<ArgTs>(args)...);
     }
 
     /*
     }
 
     /*
@@ -297,10 +286,10 @@ public:
      */
     template <bool AppendCauseV, typename ExcT, typename... ArgTs>
     [[noreturn]] void logErrorAndThrow(const char * const fileName, const char * const funcName,
      */
     template <bool AppendCauseV, typename ExcT, typename... ArgTs>
     [[noreturn]] void logErrorAndThrow(const char * const fileName, const char * const funcName,
-                                       const unsigned int lineNo, const char * const fmt,
+                                       const unsigned int lineNo, fmt::format_string<ArgTs...> fmt,
                                        ArgTs&&...args) const
     {
                                        ArgTs&&...args) const
     {
-        this->log<Level::Error, AppendCauseV>(fileName, funcName, lineNo, fmt,
+        this->log<Level::Error, AppendCauseV>(fileName, funcName, lineNo, std::move(fmt),
                                               std::forward<ArgTs>(args)...);
         throw ExcT {};
     }
                                               std::forward<ArgTs>(args)...);
         throw ExcT {};
     }
@@ -310,10 +299,10 @@ public:
      */
     template <bool AppendCauseV, typename... ArgTs>
     [[noreturn]] void logErrorAndRethrow(const char * const fileName, const char * const funcName,
      */
     template <bool AppendCauseV, typename... ArgTs>
     [[noreturn]] void logErrorAndRethrow(const char * const fileName, const char * const funcName,
-                                         const unsigned int lineNo, const char * const fmt,
-                                         ArgTs&&...args) const
+                                         const unsigned int lineNo,
+                                         fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->log<Level::Error, AppendCauseV>(fileName, funcName, lineNo, fmt,
+        this->log<Level::Error, AppendCauseV>(fileName, funcName, lineNo, std::move(fmt),
                                               std::forward<ArgTs>(args)...);
         throw;
     }
                                               std::forward<ArgTs>(args)...);
         throw;
     }
@@ -343,12 +332,12 @@ public:
      */
     template <Level LevelV, bool AppendCauseV, typename... ArgTs>
     void logErrno(const char * const fileName, const char * const funcName,
      */
     template <Level LevelV, bool AppendCauseV, typename... ArgTs>
     void logErrno(const char * const fileName, const char * const funcName,
-                  const unsigned int lineNo, const char * const initMsg, const char * const fmt,
-                  ArgTs&&...args) const
+                  const unsigned int lineNo, const char * const initMsg,
+                  fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->_log<_InitMsgLogWriter, LevelV, AppendCauseV>(fileName, funcName, lineNo, {},
-                                                            this->_errnoIntroStr(initMsg).c_str(),
-                                                            fmt, std::forward<ArgTs>(args)...);
+        this->_log<_InitMsgLogWriter, LevelV, AppendCauseV>(
+            fileName, funcName, lineNo, {}, this->_errnoIntroStr(initMsg).c_str(), std::move(fmt),
+            std::forward<ArgTs>(args)...);
     }
 
     /*
     }
 
     /*
@@ -358,11 +347,11 @@ public:
     template <bool AppendCauseV, typename ExcT, typename... ArgTs>
     [[noreturn]] void logErrorErrnoAndThrow(const char * const fileName,
                                             const char * const funcName, const unsigned int lineNo,
     template <bool AppendCauseV, typename ExcT, typename... ArgTs>
     [[noreturn]] void logErrorErrnoAndThrow(const char * const fileName,
                                             const char * const funcName, const unsigned int lineNo,
-                                            const char * const initMsg, const char * const fmt,
-                                            ArgTs&&...args) const
+                                            const char * const initMsg,
+                                            fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->logErrno<Level::Error, AppendCauseV>(fileName, funcName, lineNo, initMsg, fmt,
-                                                   std::forward<ArgTs>(args)...);
+        this->logErrno<Level::Error, AppendCauseV>(fileName, funcName, lineNo, initMsg,
+                                                   std::move(fmt), std::forward<ArgTs>(args)...);
         throw ExcT {};
     }
 
         throw ExcT {};
     }
 
@@ -370,13 +359,13 @@ public:
      * Like logErrno() with the `Level::Error` level, but also rethrows.
      */
     template <bool AppendCauseV, typename... ArgTs>
      * Like logErrno() with the `Level::Error` level, but also rethrows.
      */
     template <bool AppendCauseV, typename... ArgTs>
-    [[noreturn]] void logErrorErrnoAndRethrow(const char * const fileName,
-                                              const char * const funcName,
-                                              const unsigned int lineNo, const char * const initMsg,
-                                              const char * const fmt, ArgTs&&...args) const
+    [[noreturn]] void
+    logErrorErrnoAndRethrow(const char * const fileName, const char * const funcName,
+                            const unsigned int lineNo, const char * const initMsg,
+                            fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->logErrno<Level::Error, AppendCauseV>(fileName, funcName, lineNo, initMsg, fmt,
-                                                   std::forward<ArgTs>(args)...);
+        this->logErrno<Level::Error, AppendCauseV>(fileName, funcName, lineNo, initMsg,
+                                                   std::move(fmt), std::forward<ArgTs>(args)...);
         throw;
     }
 
         throw;
     }
 
@@ -401,10 +390,10 @@ public:
      */
     template <Level LevelV, typename... ArgTs>
     void logMem(const char * const fileName, const char * const funcName, const unsigned int lineNo,
      */
     template <Level LevelV, typename... ArgTs>
     void logMem(const char * const fileName, const char * const funcName, const unsigned int lineNo,
-                const MemData memData, const char * const fmt, ArgTs&&...args) const
+                const MemData memData, fmt::format_string<ArgTs...> fmt, ArgTs&&...args) const
     {
     {
-        this->_log<_MemLogWriter, LevelV, false>(fileName, funcName, lineNo, memData, "", fmt,
-                                                 std::forward<ArgTs>(args)...);
+        this->_log<_MemLogWriter, LevelV, false>(fileName, funcName, lineNo, memData, "",
+                                                 std::move(fmt), std::forward<ArgTs>(args)...);
     }
 
 private:
     }
 
 private:
@@ -421,7 +410,7 @@ private:
      */
     template <typename LogWriterT, Level LevelV, bool AppendCauseV, typename... ArgTs>
     void _log(const char * const fileName, const char * const funcName, const unsigned int lineNo,
      */
     template <typename LogWriterT, Level LevelV, bool AppendCauseV, typename... ArgTs>
     void _log(const char * const fileName, const char * const funcName, const unsigned int lineNo,
-              const MemData memData, const char * const initMsg, const char * const fmt,
+              const MemData memData, const char * const initMsg, fmt::format_string<ArgTs...> fmt,
               ArgTs&&...args) const
     {
         const auto wouldLog = this->wouldLog(LevelV);
               ArgTs&&...args) const
     {
         const auto wouldLog = this->wouldLog(LevelV);
@@ -433,8 +422,7 @@ private:
              * append a null character).
              */
             _mBuf.clear();
              * append a null character).
              */
             _mBuf.clear();
-            BT_ASSERT(fmt);
-            fmt::format_to(std::back_inserter(_mBuf), fmt, std::forward<ArgTs>(args)...);
+            fmt::format_to(std::back_inserter(_mBuf), std::move(fmt), std::forward<ArgTs>(args)...);
             _mBuf.push_back('\0');
         }
 
             _mBuf.push_back('\0');
         }
 
index 516a82637ef4f48d568bf93abb3041e197517f61..e40a913f32765129ffddabb6c8f07faf9c6ecc93 100644 (file)
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: MIT
  */
 
  * SPDX-License-Identifier: MIT
  */
 
-#ifndef SRC_CPP_COMMON_VECTOR_HPP
-#define SRC_CPP_COMMON_VECTOR_HPP
+#ifndef BABELTRACE_CPP_COMMON_BT2C_VECTOR_HPP
+#define BABELTRACE_CPP_COMMON_BT2C_VECTOR_HPP
 
 #include <vector>
 
 
 #include <vector>
 
@@ -34,4 +34,4 @@ void vectorFastRemove(std::vector<T, AllocatorT>& vec,
 
 } /* namespace bt2c */
 
 
 } /* namespace bt2c */
 
-#endif /* SRC_CPP_COMMON_VECTOR_HPP */
+#endif /* BABELTRACE_CPP_COMMON_BT2C_VECTOR_HPP */
index 3d2d86a427f48c55d108b45302ac45789fe9bc15..9a7182f5b0b2c4e93b5307c2f2d667eb6ea51bc7 100644 (file)
@@ -1870,7 +1870,7 @@ using span_lite::byte_span;
 
 #endif // span_FEATURE( BYTE_SPAN )
 
 
 #endif // span_FEATURE( BYTE_SPAN )
 
-#if span_HAVE( STRUCT_BINDING )
+#if !span_USES_STD_SPAN && span_HAVE( STRUCT_BINDING )
 
 #if   span_CPP14_OR_GREATER
 # include <tuple>
 
 #if   span_CPP14_OR_GREATER
 # include <tuple>
@@ -1938,7 +1938,7 @@ span_constexpr ElementType const & get( nonstd::span<ElementType, Extent> const
 
 } // end namespace std
 
 
 } // end namespace std
 
-#endif // span_HAVE( STRUCT_BINDING )
+#endif // !span_USES_STD_SPAN && span_HAVE( STRUCT_BINDING )
 
 #if ! span_USES_STD_SPAN
 span_RESTORE_WARNINGS()
 
 #if ! span_USES_STD_SPAN
 span_RESTORE_WARNINGS()
index 38e3ac2c98644e96d875ed0efab7b728cf97eb53..a118841d831f980d8581ac843c7d97212e024475 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_ASSERT_PRE_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_ASSERT_PRE_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_ASSERT_PRE_H
+#define BABELTRACE_CTF_WRITER_ASSERT_PRE_H
 
 /*
  * The macros in this header use macros defined in "logging/log.h". We
 
 /*
  * The macros in this header use macros defined in "logging/log.h". We
                "Index is out of bounds: index=%" PRIu64 ", "           \
                "count=%" PRIu64, (uint64_t) (_index), (uint64_t) (_length))
 
                "Index is out of bounds: index=%" PRIu64 ", "           \
                "count=%" PRIu64, (uint64_t) (_index), (uint64_t) (_length))
 
-#endif /* BABELTRACE_CTF_WRITER_ASSERT_PRE_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_ASSERT_PRE_H */
index adbba43a39e68b5795464cac6bb1a0bb915e8c0a..588b2d71cd449cff819fefd0f4dc1db9a8bbbacd 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_CLOCK_CLASS_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_CLOCK_CLASS_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_CLOCK_CLASS_H
+#define BABELTRACE_CTF_WRITER_CLOCK_CLASS_H
 
 #include "common/macros.h"
 #include "object-pool.h"
 
 #include "common/macros.h"
 #include "object-pool.h"
@@ -78,4 +78,4 @@ const uint8_t *bt_ctf_clock_class_get_uuid(
 int bt_ctf_clock_class_set_uuid(struct bt_ctf_clock_class *clock_class,
                const uint8_t *uuid);
 
 int bt_ctf_clock_class_set_uuid(struct bt_ctf_clock_class *clock_class,
                const uint8_t *uuid);
 
-#endif /* BABELTRACE_CTF_WRITER_CLOCK_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_CLOCK_CLASS_H */
index cad188e7cd7bd3cce35c98897adeaadcb4912c68..3fc2a15cf5a7d192fdbf104ba3e1e218422f192b 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_CLOCK_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_CLOCK_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_CLOCK_H
+#define BABELTRACE_CTF_WRITER_CLOCK_H
 
 #include <babeltrace2-ctf-writer/clock.h>
 #include "common/macros.h"
 
 #include <babeltrace2-ctf-writer/clock.h>
 #include "common/macros.h"
@@ -28,4 +28,4 @@ int bt_ctf_clock_get_value(struct bt_ctf_clock *clock, uint64_t *value);
 void bt_ctf_clock_class_serialize(struct bt_ctf_clock_class *clock_class,
                struct metadata_context *context);
 
 void bt_ctf_clock_class_serialize(struct bt_ctf_clock_class *clock_class,
                struct metadata_context *context);
 
-#endif /* BABELTRACE_CTF_WRITER_CLOCK_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_CLOCK_H */
index 429888a735f4999c1b3d0a4d2a938378365f7e80..e8e53114548f30621ce7e264cbb3990e57aaf060 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_EVENT_CLASS_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_EVENT_CLASS_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_EVENT_CLASS_H
+#define BABELTRACE_CTF_WRITER_EVENT_CLASS_H
 
 #include "common/assert.h"
 #include "common/macros.h"
 
 #include "common/assert.h"
 #include "common/macros.h"
@@ -371,4 +371,4 @@ end:
        return ret;
 }
 
        return ret;
 }
 
-#endif /* BABELTRACE_CTF_WRITER_EVENT_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_EVENT_CLASS_H */
index 52e4c5200a7e745fd1bd7fdaff51d9c11671b1fd..df043477750d3a232de6e94d0519b8e2832990d8 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_EVENT_H
+#define BABELTRACE_CTF_WRITER_EVENT_H
 
 #include <stdbool.h>
 
 
 #include <stdbool.h>
 
@@ -249,4 +249,4 @@ struct bt_ctf_stream_class *bt_ctf_event_class_borrow_stream_class(
                BT_CTF_TO_COMMON(event_class)));
 }
 
                BT_CTF_TO_COMMON(event_class)));
 }
 
-#endif /* BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_EVENT_H */
index c823f009467004d4ea96d7b6e93ab307679a8b09..372a8c97685aeefe83dba7a6eccc149014d958aa 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL
-#define BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL
+#ifndef BABELTRACE_CTF_WRITER_FIELD_PATH_H
+#define BABELTRACE_CTF_WRITER_FIELD_PATH_H
 
 #include "common/common.h"
 #include "common/assert.h"
 
 #include "common/common.h"
 #include "common/assert.h"
@@ -47,4 +47,4 @@ int64_t bt_ctf_field_path_get_index_count(
 int bt_ctf_field_path_get_index(
                const struct bt_ctf_field_path *field_path, uint64_t index);
 
 int bt_ctf_field_path_get_index(
                const struct bt_ctf_field_path *field_path, uint64_t index);
 
-#endif /* BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL */
+#endif /* BABELTRACE_CTF_WRITER_FIELD_PATH_H */
index f5dbd99ea0fad4139faec4fe5569fb71aa99f1bb..2ee48a4b746b21475e89f849b655077e786de021 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_FIELD_TYPES_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_FIELD_TYPES_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_FIELD_TYPES_H
+#define BABELTRACE_CTF_WRITER_FIELD_TYPES_H
 
 #include <stdbool.h>
 #include <stdint.h>
 
 #include <stdbool.h>
 #include <stdint.h>
@@ -671,4 +671,4 @@ int bt_ctf_field_type_serialize_recursive(struct bt_ctf_field_type *type,
 
 struct bt_ctf_field_type *bt_ctf_field_type_copy(struct bt_ctf_field_type *ft);
 
 
 struct bt_ctf_field_type *bt_ctf_field_type_copy(struct bt_ctf_field_type *ft);
 
-#endif /* BABELTRACE_CTF_WRITER_FIELD_TYPES_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_FIELD_TYPES_H */
index 2b3286d2116d8b660bcba70ed0eabd868df2fb10..f0053cf8e5ca3e441606e647d4d0387189a61c47 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_FIELD_WRAPPER_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_FIELD_WRAPPER_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_FIELD_WRAPPER_H
+#define BABELTRACE_CTF_WRITER_FIELD_WRAPPER_H
 
 #include "common/macros.h"
 
 
 #include "common/macros.h"
 
@@ -27,4 +27,4 @@ void bt_ctf_field_wrapper_destroy(struct bt_ctf_field_wrapper *field);
 struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_create(
                struct bt_ctf_object_pool *pool, struct bt_ctf_field_type *ft);
 
 struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_create(
                struct bt_ctf_object_pool *pool, struct bt_ctf_field_type *ft);
 
-#endif /* BABELTRACE_CTF_WRITER_FIELD_WRAPPER_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_FIELD_WRAPPER_H */
index 3c13c3efa215636229cd7f35a83e05134f0fb4e2..8a440206980df0998a4a0b50246a47c63c04c09f 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_FIELDS_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_FIELDS_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_FIELDS_H
+#define BABELTRACE_CTF_WRITER_FIELDS_H
 
 #include <glib.h>
 #include <inttypes.h>
 
 #include <glib.h>
 #include <inttypes.h>
@@ -807,4 +807,4 @@ bt_ctf_bool bt_ctf_field_is_set_recursive(
        return bt_ctf_field_common_is_set_recursive((void *) field);
 }
 
        return bt_ctf_field_common_is_set_recursive((void *) field);
 }
 
-#endif /* BABELTRACE_CTF_WRITER_FIELDS_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_FIELDS_H */
index 0b13d47e88ca0b27672e0421b43da81eab776524..a7f4da76a1ba8612d7f3e1225051c755aec39791 100644 (file)
@@ -4,12 +4,12 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_FUNCTOR_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_FUNCTOR_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_FUNCTOR_H
+#define BABELTRACE_CTF_WRITER_FUNCTOR_H
 
 #include <glib.h>
 #include "common/macros.h"
 
 void value_exists(gpointer element, gpointer search_query);
 
 
 #include <glib.h>
 #include "common/macros.h"
 
 void value_exists(gpointer element, gpointer search_query);
 
-#endif /* BABELTRACE_CTF_WRITER_FUNCTOR_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_FUNCTOR_H */
index 34679ebf708427ab3d5212903ff84c5055e6caea..fc11823635cb4f5106d1c780ef09621d25cf5b02 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_OBJECT_POOL_H
+#define BABELTRACE_CTF_WRITER_OBJECT_POOL_H
 
 /*
  * This is a generic object pool to avoid memory allocation/deallocation
 
 /*
  * This is a generic object pool to avoid memory allocation/deallocation
@@ -165,4 +165,4 @@ void bt_ctf_object_pool_recycle_object(struct bt_ctf_object_pool *pool, void *ob
 #endif
 }
 
 #endif
 }
 
-#endif /* BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_OBJECT_POOL_H */
index 0f8eec4c8bea9236f299d4344af89119064b2ff8..149e165897a3e6db180dc9d1838a5d186235b5b7 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_OBJECT_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_OBJECT_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_OBJECT_H
+#define BABELTRACE_CTF_WRITER_OBJECT_H
 
 #include "common/macros.h"
 #include "common/assert.h"
 
 #include "common/macros.h"
 #include "common/assert.h"
@@ -296,4 +296,4 @@ void bt_ctf_object_put_no_null_check(struct bt_ctf_object *obj)
        }
 }
 
        }
 }
 
-#endif /* BABELTRACE_CTF_WRITER_OBJECT_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_OBJECT_H */
index 7d72e9343bf94beab3034d6ee0f2a8d0a494d68d..15837bf69615bae1b9f9d83d22c6623c028ba83d 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_RESOLVE_H
+#define BABELTRACE_CTF_WRITER_RESOLVE_H
 
 #include <babeltrace2-ctf-writer/field-types.h>
 #include "common/macros.h"
 
 #include <babeltrace2-ctf-writer/field-types.h>
 #include "common/macros.h"
@@ -48,4 +48,4 @@ int bt_ctf_resolve_types(struct bt_ctf_private_value *environment,
                struct bt_ctf_field_type_common *event_payload_type,
                enum bt_ctf_resolve_flag flags);
 
                struct bt_ctf_field_type_common *event_payload_type,
                enum bt_ctf_resolve_flag flags);
 
-#endif /* BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_RESOLVE_H */
index ab54ce73db762c161437ebf565a1343b0749af36..1a8a0f1724721411bcd64ecde5fec230b77d9a31 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_STREAM_CLASS_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_STREAM_CLASS_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_STREAM_CLASS_H
+#define BABELTRACE_CTF_WRITER_STREAM_CLASS_H
 
 #include "common/assert.h"
 #include "common/macros.h"
 
 #include "common/assert.h"
 #include "common/macros.h"
@@ -508,4 +508,4 @@ int bt_ctf_stream_class_map_clock_class(
                struct bt_ctf_field_type *packet_context_type,
                struct bt_ctf_field_type *event_header_type);
 
                struct bt_ctf_field_type *packet_context_type,
                struct bt_ctf_field_type *event_header_type);
 
-#endif /* BABELTRACE_CTF_WRITER_STREAM_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_STREAM_CLASS_H */
index 605a3e55e2619d9eff8e706e9f7d3f643e7f629b..f5817c504a160621f1a3fc225514bc85f8d3e8f9 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_STREAM_H
+#define BABELTRACE_CTF_WRITER_STREAM_H
 
 #include "common/assert.h"
 #include "common/macros.h"
 
 #include "common/assert.h"
 #include "common/macros.h"
@@ -84,4 +84,4 @@ struct bt_ctf_stream *bt_ctf_stream_create_with_id(
                struct bt_ctf_stream_class *stream_class,
                const char *name, uint64_t id);
 
                struct bt_ctf_stream_class *stream_class,
                const char *name, uint64_t id);
 
-#endif /* BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_STREAM_H */
index 29df2f4290eee5de3c53274f44bfeadb2ec21184..eb751ea99faf8877d87bbea91896a76305749faa 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_TRACE_H
+#define BABELTRACE_CTF_WRITER_TRACE_H
 
 #include "common/macros.h"
 #include "common/uuid.h"
 
 #include "common/macros.h"
 #include "common/uuid.h"
@@ -350,4 +350,4 @@ bt_ctf_trace_get_environment_field_value_by_name(
 int bt_ctf_trace_visit(struct bt_ctf_trace *trace,
                bt_ctf_visitor visitor, void *data);
 
 int bt_ctf_trace_visit(struct bt_ctf_trace *trace,
                bt_ctf_visitor visitor, void *data);
 
-#endif /* BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_TRACE_H */
index 1ea5406a67c4e7058383060967de9af08397b30e..4bd6bd680525f09eaaaee7680ca8ac11b1daacb4 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 EfficiOS, Inc
  */
 
  * Copyright 2019 EfficiOS, Inc
  */
 
-#ifndef BABELTRACE_CTF_WRITER_UTILS_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_UTILS_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_UTILS_H
+#define BABELTRACE_CTF_WRITER_UTILS_H
 
 #include "common/macros.h"
 #include <babeltrace2-ctf-writer/field-types.h>
 
 #include "common/macros.h"
 #include <babeltrace2-ctf-writer/field-types.h>
@@ -204,4 +204,4 @@ end:
        return str;
 }
 
        return str;
 }
 
-#endif /* BABELTRACE_CTF_WRITER_UTILS_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_UTILS_H */
index fef42a6da542e932249114cf8199910d8f621593..0b93ddf930ae0b053592097d107d9a2446e1164d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_VALIDATION_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_VALIDATION_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_VALIDATION_H
+#define BABELTRACE_CTF_WRITER_VALIDATION_H
 
 #include "common/macros.h"
 
 
 #include "common/macros.h"
 
@@ -106,4 +106,4 @@ void bt_ctf_validation_replace_types(struct bt_ctf_trace_common *trace,
 void bt_ctf_validation_output_put_types(
                struct bt_ctf_validation_output *output);
 
 void bt_ctf_validation_output_put_types(
                struct bt_ctf_validation_output *output);
 
-#endif /* BABELTRACE_CTF_WRITER_VALIDATION_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_VALIDATION_H */
index ad29a9fb356cf7eeb9c84779cb0227f6b9529923..e752c475220fffd9fa7539792c69ae17c6a21fbe 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2015-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2015-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_VALUES_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_VALUES_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_VALUES_H
+#define BABELTRACE_CTF_WRITER_VALUES_H
 
 #include <babeltrace2-ctf-writer/types.h>
 
 
 #include <babeltrace2-ctf-writer/types.h>
 
@@ -293,4 +293,4 @@ const char *bt_ctf_value_type_string(enum bt_ctf_value_type type)
        }
 };
 
        }
 };
 
-#endif /* BABELTRACE_CTF_WRITER_VALUES_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_VALUES_H */
index bdbf2283bef773e23f8b2ca24ebe0d978208e6b9..93375259423a8bc12ff7d01ac6002ac033a7f9be 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_VISITOR_H
+#define BABELTRACE_CTF_WRITER_VISITOR_H
 
 #include <stdlib.h>
 #include <stdint.h>
 
 #include <stdlib.h>
 #include <stdint.h>
@@ -29,4 +29,4 @@ int bt_ctf_visitor_helper(struct bt_ctf_visitor_object *root,
                bt_ctf_visitor visitor,
                void *data);
 
                bt_ctf_visitor visitor,
                void *data);
 
-#endif /* BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_VISITOR_H */
index 24c92c36b1d7d9f59112988f5053a9cdf3b851f3..e99bb4da93c7ffca1dbcfa6e0a221de2a15dc54b 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
+#ifndef BABELTRACE_CTF_WRITER_WRITER_H
+#define BABELTRACE_CTF_WRITER_WRITER_H
 
 #include <dirent.h>
 #include <glib.h>
 
 #include <dirent.h>
 #include <glib.h>
@@ -48,4 +48,4 @@ const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
 
 void bt_ctf_writer_freeze(struct bt_ctf_writer *writer);
 
 
 void bt_ctf_writer_freeze(struct bt_ctf_writer *writer);
 
-#endif /* BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H */
+#endif /* BABELTRACE_CTF_WRITER_WRITER_H */
index 33d48d2042d6cc915faf0dc76e6f148b5832709b..20f8bded058586799a6ced585b3efc4d9c91e040 100644 (file)
@@ -9,8 +9,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_CTFSER_INTERNAL_H
-#define BABELTRACE_CTFSER_INTERNAL_H
+#ifndef BABELTRACE_CTFSER_CTFSER_H
+#define BABELTRACE_CTFSER_CTFSER_H
 
 #include <stdbool.h>
 #include <stdlib.h>
 
 #include <stdbool.h>
 #include <stdlib.h>
@@ -562,4 +562,4 @@ const char *bt_ctfser_get_file_path(struct bt_ctfser *ctfser)
        return ctfser->path->str;
 }
 
        return ctfser->path->str;
 }
 
-#endif /* BABELTRACE_CTFSER_INTERNAL_H */
+#endif /* BABELTRACE_CTFSER_CTFSER_H */
index 9a04bb47330c756256f350884665b702e977728d..6d1e4c100af451ac6188d1487a21dd964f15015f 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace - File descriptor cache
  */
 
  * Babeltrace - File descriptor cache
  */
 
-#ifndef BABELTRACE_FD_CACHE_INTERNAL_H
-#define BABELTRACE_FD_CACHE_INTERNAL_H
+#ifndef BABELTRACE_FD_CACHE_FD_CACHE_H
+#define BABELTRACE_FD_CACHE_FD_CACHE_H
 
 #include "common/macros.h"
 
 
 #include "common/macros.h"
 
@@ -36,4 +36,4 @@ struct bt_fd_cache_handle *bt_fd_cache_get_handle(struct bt_fd_cache *fdc,
 void bt_fd_cache_put_handle(struct bt_fd_cache *fdc,
                struct bt_fd_cache_handle *handle);
 
 void bt_fd_cache_put_handle(struct bt_fd_cache *fdc,
                struct bt_fd_cache_handle *handle);
 
-#endif /* BABELTRACE_FD_CACHE_INTERNAL_H */
+#endif /* BABELTRACE_FD_CACHE_FD_CACHE_H */
index c8d04b63ea6dbc6fbfc61023e64eec7273183700..a2dc3c5b940d163e554ee761ed4ece39e12bbb10 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018-2020 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018-2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_ASSERT_COND_BASE_INTERNAL_H
-#define BABELTRACE_ASSERT_COND_BASE_INTERNAL_H
+#ifndef BABELTRACE_LIB_ASSERT_COND_BASE_H
+#define BABELTRACE_LIB_ASSERT_COND_BASE_H
 
 /*
  * The macros in this header use macros defined in "lib/logging.h". We
 
 /*
  * The macros in this header use macros defined in "lib/logging.h". We
@@ -165,4 +165,4 @@ void bt_lib_assert_cond_failed(const char *cond_type, const char *func,
  */
 #define BT_ASSERT_COND_SUPPORTED
 
  */
 #define BT_ASSERT_COND_SUPPORTED
 
-#endif /* BABELTRACE_ASSERT_COND_BASE_INTERNAL_H */
+#endif /* BABELTRACE_LIB_ASSERT_COND_BASE_H */
index 4868c48c07fd3738912b8a1d6afaf3c02a698b86..993edcc994922d352c2079331e3819475c6f50ae 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2018-2020 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018-2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_ASSERT_COND_INTERNAL_H
-#define BABELTRACE_ASSERT_COND_INTERNAL_H
+#ifndef BABELTRACE_LIB_ASSERT_COND_H
+#define BABELTRACE_LIB_ASSERT_COND_H
 
 #include "assert-cond-base.h"
 
 
 #include "assert-cond-base.h"
 
        BT_ASSERT_PRE_DEV_NON_NULL(_BT_ASSERT_PRE_KEY_ID, (_key),       \
                _BT_ASSERT_PRE_KEY_NAME)
 
        BT_ASSERT_PRE_DEV_NON_NULL(_BT_ASSERT_PRE_KEY_ID, (_key),       \
                _BT_ASSERT_PRE_KEY_NAME)
 
-#endif /* BABELTRACE_ASSERT_COND_INTERNAL_H */
+#endif /* BABELTRACE_LIB_ASSERT_COND_H */
index 39788185629eb90a9df65c1fa69f967765394366..41bf71011828e25c1593cb9526cb86de04bff81d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_ERROR_INTERNAL_H
-#define BABELTRACE_ERROR_INTERNAL_H
+#ifndef BABELTRACE_LIB_ERROR_H
+#define BABELTRACE_LIB_ERROR_H
 
 #include <stdarg.h>
 #include <glib.h>
 
 #include <stdarg.h>
 #include <glib.h>
@@ -97,4 +97,4 @@ int bt_error_append_cause_from_message_iterator(
                const char *file_name, uint64_t line_no,
                const char *msg_fmt, va_list args);
 
                const char *file_name, uint64_t line_no,
                const char *msg_fmt, va_list args);
 
-#endif /* BABELTRACE_ERROR_INTERNAL_H */
+#endif /* BABELTRACE_LIB_ERROR_H */
index 1da2097b7517318cc2957cba442f0c823f50668d..0f366cab3d645c50e93bebf0084ef7775209b8da 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_FUNC_STATUS_INTERNAL_H
-#define BABELTRACE_FUNC_STATUS_INTERNAL_H
+#ifndef BABELTRACE_LIB_FUNC_STATUS_H
+#define BABELTRACE_LIB_FUNC_STATUS_H
 
 #define __BT_IN_BABELTRACE_H
 #include <babeltrace2/func-status.h>
 
 #define __BT_IN_BABELTRACE_H
 #include <babeltrace2/func-status.h>
@@ -26,4 +26,4 @@
 #define BT_FUNC_STATUS_OK              __BT_FUNC_STATUS_OK
 #define BT_FUNC_STATUS_OVERFLOW_ERROR  __BT_FUNC_STATUS_OVERFLOW_ERROR
 
 #define BT_FUNC_STATUS_OK              __BT_FUNC_STATUS_OK
 #define BT_FUNC_STATUS_OVERFLOW_ERROR  __BT_FUNC_STATUS_OVERFLOW_ERROR
 
-#endif /* BABELTRACE_FUNC_STATUS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_FUNC_STATUS_H */
index 7143da96d84153785655c0ff7788e5c6f0cccf37..ce49017843e1e7d9afedd59e3237a7c5d518c311 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H
-#define BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H
 
 #include <babeltrace2/types.h>
 #include <babeltrace2/graph/message.h>
 
 #include <babeltrace2/types.h>
 #include <babeltrace2/graph/message.h>
@@ -19,4 +19,4 @@ struct simple_sink_init_method_data {
 
 struct bt_component_class_sink *bt_component_class_sink_simple_borrow(void);
 
 
 struct bt_component_class_sink *bt_component_class_sink_simple_borrow(void);
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H */
index c6a69e5746514cd0917b4d1834213947907d5c33..b8ce3ccfd339bbbc1d5b0dd190b9ea5ab7a0c112 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_CLASS_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_H
 
 #include <babeltrace2/graph/component-class.h>
 #include <babeltrace2/graph/component.h>
 
 #include <babeltrace2/graph/component-class.h>
 #include <babeltrace2/graph/component.h>
@@ -103,4 +103,4 @@ bool bt_component_class_has_message_iterator_class(
                component_class->type == BT_COMPONENT_CLASS_TYPE_FILTER;
 }
 
                component_class->type == BT_COMPONENT_CLASS_TYPE_FILTER;
 }
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_CLASS_H */
index fdc90f461864e50cae204287581eebe51c1fe897..77f7459fc9409075d0d201510a8870dc622e4721 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_DESCRIPTOR_SET_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_DESCRIPTOR_SET_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_DESCRIPTOR_SET_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_DESCRIPTOR_SET_H
 
 #include <babeltrace2/graph/graph.h>
 #include <babeltrace2/graph/component-descriptor-set.h>
 
 #include <babeltrace2/graph/graph.h>
 #include <babeltrace2/graph/component-descriptor-set.h>
@@ -39,4 +39,4 @@ struct bt_component_descriptor_set {
        GPtrArray *sinks;
 };
 
        GPtrArray *sinks;
 };
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_DESCRIPTOR_SET_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_DESCRIPTOR_SET_H */
index 8308919182c7fba87bd4a5ff578ba65c0cc3b5a3..53f7ed8fbc7fbe0ab65dc3666292e1fd8e9e345c 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_FILTER_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_FILTER_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_FILTER_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_FILTER_H
 
 #include <babeltrace2/graph/component.h>
 
 
 #include <babeltrace2/graph/component.h>
 
@@ -18,4 +18,4 @@ struct bt_component_filter {
 
 struct bt_component *bt_component_filter_create(void);
 
 
 struct bt_component *bt_component_filter_create(void);
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_FILTER_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_FILTER_H */
index 2c4569c061d3af6f2e5a4a6f20ba4808590019a6..69aa48e457b1353020176bfcfdca1e57ad731fba 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_SINK_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_SINK_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_SINK_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_SINK_H
 
 #include <stdbool.h>
 
 
 #include <stdbool.h>
 
@@ -22,4 +22,4 @@ struct bt_component_sink {
 
 struct bt_component *bt_component_sink_create(void);
 
 
 struct bt_component *bt_component_sink_create(void);
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_SINK_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_SINK_H */
index c91ebda45861c0e964c5cd02e91c036ee5b0efee..6b0333db10418f8392ad50b285cbd14fa0e74e5d 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_SOURCE_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_SOURCE_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_SOURCE_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_SOURCE_H
 
 #include "component.h"
 
 
 #include "component.h"
 
@@ -16,4 +16,4 @@ struct bt_component_source {
 
 struct bt_component *bt_component_source_create(void);
 
 
 struct bt_component *bt_component_source_create(void);
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_SOURCE_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_SOURCE_H */
index 401cc38591b27873933eeaa3ad03f82bde680bf0..dbe1f1ff95ec28175d7725303c8dea5c7a963483 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_COMPONENT_INTERNAL_H
-#define BABELTRACE_GRAPH_COMPONENT_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_COMPONENT_H
+#define BABELTRACE_LIB_GRAPH_COMPONENT_H
 
 #include <babeltrace2/graph/component.h>
 #include <babeltrace2/graph/component-class.h>
 
 #include <babeltrace2/graph/component.h>
 #include <babeltrace2/graph/component-class.h>
@@ -109,4 +109,4 @@ void bt_component_add_destroy_listener(struct bt_component *component,
 void bt_component_remove_destroy_listener(struct bt_component *component,
                bt_component_destroy_listener_func func, void *data);
 
 void bt_component_remove_destroy_listener(struct bt_component *component,
                bt_component_destroy_listener_func func, void *data);
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_COMPONENT_H */
index cc512e1f1361a941d97ff3219bd93ce617332749..18c586dd311b541e442779563af6b20476b2d865 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_CONNECTION_INTERNAL_H
-#define BABELTRACE_GRAPH_CONNECTION_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_CONNECTION_H
+#define BABELTRACE_LIB_GRAPH_CONNECTION_H
 
 #include <babeltrace2/graph/connection.h>
 #include "lib/object.h"
 
 #include <babeltrace2/graph/connection.h>
 #include "lib/object.h"
@@ -60,4 +60,4 @@ struct bt_graph *bt_connection_borrow_graph(struct bt_connection *conn)
        return (void *) conn->base.parent;
 }
 
        return (void *) conn->base.parent;
 }
 
-#endif /* BABELTRACE_GRAPH_CONNECTION_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_CONNECTION_H */
index 01dfaec6a8df300cccde917a897560cb2fd31d4e..efc96991f54f86edceaca4708d958d2e93560dca 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_GRAPH_INTERNAL_H
-#define BABELTRACE_GRAPH_GRAPH_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_GRAPH_H
+#define BABELTRACE_LIB_GRAPH_GRAPH_H
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
@@ -172,4 +172,4 @@ void bt_graph_make_faulty(struct bt_graph *graph)
        BT_LIB_LOGI("Set graph's state to faulty: %![graph-]+g", graph);
 }
 
        BT_LIB_LOGI("Set graph's state to faulty: %![graph-]+g", graph);
 }
 
-#endif /* BABELTRACE_GRAPH_GRAPH_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_GRAPH_H */
index 72b93288066d4c2334aae721ba3d43dddc2c9660..fa533201021d1e1376cb0d50d01f99012a4e0fa7 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H
-#define BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_INTERRUPTER_H
+#define BABELTRACE_LIB_GRAPH_INTERRUPTER_H
 
 #include <stdbool.h>
 
 
 #include <stdbool.h>
 
@@ -40,4 +40,4 @@ end:
        return is_set;
 }
 
        return is_set;
 }
 
-#endif /* BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_INTERRUPTER_H */
index e508dc2bf66b7108886e4d74f0b47729c48ec58e..5c7ea912bb7111f0c798cfb6acb146270c6b4e96 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_ITERATOR_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_ITERATOR_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_ITERATOR_H
+#define BABELTRACE_LIB_GRAPH_ITERATOR_H
 
 #include "common/macros.h"
 #include "lib/object.h"
 
 #include "common/macros.h"
 #include "lib/object.h"
@@ -189,4 +189,4 @@ const char *bt_message_iterator_state_string(
        }
 };
 
        }
 };
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_ITERATOR_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_ITERATOR_H */
index 0606aa72b6fe1dfbc20bfe39286d9314f777e678..d8625d76118cb52078d654298d070b35bbd5fbf8 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_ITERATOR_CLASS_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_ITERATOR_CLASS_H
 
 #include <babeltrace2/graph/message-iterator-class.h>
 #include <babeltrace2/types.h>
 
 #include <babeltrace2/graph/message-iterator-class.h>
 #include <babeltrace2/types.h>
@@ -38,4 +38,4 @@ void _bt_message_iterator_class_freeze(
 # define bt_message_iterator_class_freeze(_cls)
 #endif
 
 # define bt_message_iterator_class_freeze(_cls)
 #endif
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_ITERATOR_CLASS_H */
index fe3416b14707bd135d1ebc1321c2740d208286ab..5809a41da7026c2be2297b86739920e70c133f1d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_DISCARDED_ITEMS_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_DISCARDED_ITEMS_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_DISCARDED_ITEMS_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_DISCARDED_ITEMS_H
 
 #include <glib.h>
 #include "lib/trace-ir/clock-snapshot.h"
 
 #include <glib.h>
 #include "lib/trace-ir/clock-snapshot.h"
@@ -23,4 +23,4 @@ struct bt_message_discarded_items {
        struct bt_property_uint count;
 };
 
        struct bt_property_uint count;
 };
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_DISCARDED_ITEMS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_DISCARDED_ITEMS_H */
index 98d4acf1d6211315d435c1e61306380b9520f2e6..68cf1e7fe88f25ae6e6cd57535a17e4f243b7f32 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_EVENT_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_EVENT_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_EVENT_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_EVENT_H
 
 #include "compat/compiler.h"
 #include <babeltrace2/trace-ir/event-class.h>
 
 #include "compat/compiler.h"
 #include <babeltrace2/trace-ir/event-class.h>
@@ -34,4 +34,4 @@ void bt_message_event_destroy(struct bt_message *msg);
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_EVENT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_EVENT_H */
index 7cd1a7de3c3e6aca130cee782c23076805626d0e..28cf7a2ba4aa431ac27b5d589bf3dc24704a1093 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_H
 
 #include <glib.h>
 #include "lib/trace-ir/clock-snapshot.h"
 
 #include <glib.h>
 #include "lib/trace-ir/clock-snapshot.h"
@@ -16,4 +16,4 @@ struct bt_message_message_iterator_inactivity {
        struct bt_clock_snapshot *cs;
 };
 
        struct bt_clock_snapshot *cs;
 };
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_H */
index d6ba358a945c05b06720b2755c1723c0b781afae..3f74969485985e9b6cb44bb2e79887d59aabc338 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_MESSAGE_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_MESSAGE_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_H
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
@@ -92,4 +92,4 @@ void bt_message_unlink_graph(struct bt_message *msg);
 # define bt_message_freeze(_x)
 #endif /* BT_DEV_MODE */
 
 # define bt_message_freeze(_x)
 #endif /* BT_DEV_MODE */
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_MESSAGE_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_MESSAGE_H */
index 632aaeea9bde57491d1276a67022f026095029d6..451546b7c7f6afe7e22e15fbbb3b8da6b26595f5 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_PACKET_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_PACKET_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_PACKET_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_PACKET_H
 
 #include "compat/compiler.h"
 #include <babeltrace2/trace-ir/packet.h>
 
 #include "compat/compiler.h"
 #include <babeltrace2/trace-ir/packet.h>
@@ -30,4 +30,4 @@ struct bt_message *bt_message_packet_end_new(struct bt_graph *graph);
 
 void bt_message_packet_end_recycle(struct bt_message *msg);
 
 
 void bt_message_packet_end_recycle(struct bt_message *msg);
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_PACKET_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_PACKET_H */
index c90476db06919e671a9e484e6bbf1a6f95112cde..46af82918c74bd30351c53b4634ba027d0592ba7 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
-#define BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_MESSAGE_STREAM_H
+#define BABELTRACE_LIB_GRAPH_MESSAGE_STREAM_H
 
 #include <babeltrace2/graph/message.h>
 
 
 #include <babeltrace2/graph/message.h>
 
@@ -38,4 +38,4 @@ const char *bt_message_stream_clock_snapshot_state_string(
 }
 
 
 }
 
 
-#endif /* BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_MESSAGE_STREAM_H */
index 4a84db1c6803911bd1aca2d6f5bad9d98ef844a3..7032e52a3538f9b8faec60863616d611aeb66b7e 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_PORT_INTERNAL_H
-#define BABELTRACE_GRAPH_PORT_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_PORT_H
+#define BABELTRACE_LIB_GRAPH_PORT_H
 
 #include <babeltrace2/graph/port.h>
 
 
 #include <babeltrace2/graph/port.h>
 
@@ -46,4 +46,4 @@ const char *bt_port_type_string(enum bt_port_type port_type)
        }
 }
 
        }
 }
 
-#endif /* BABELTRACE_GRAPH_PORT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_PORT_H */
index d14de9a1936493881d3152e7ad69e741c742fc5b..eed1da314098ee86b7d466e2d7260d7e50e46b08 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_GRAPH_QUERY_EXECUTOR_INTERNAL_H
-#define BABELTRACE_GRAPH_QUERY_EXECUTOR_INTERNAL_H
+#ifndef BABELTRACE_LIB_GRAPH_QUERY_EXECUTOR_H
+#define BABELTRACE_LIB_GRAPH_QUERY_EXECUTOR_H
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -44,4 +44,4 @@ struct bt_query_executor {
        enum bt_logging_level log_level;
 };
 
        enum bt_logging_level log_level;
 };
 
-#endif /* BABELTRACE_GRAPH_QUERY_EXECUTOR_INTERNAL_H */
+#endif /* BABELTRACE_LIB_GRAPH_QUERY_EXECUTOR_H */
index c53a784976b92bdcc9181ba65cd8008b9b44c6a2..7dcc85571aa33494e8e8948178dc0e6ac3163224 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_INTEGER_RANGE_SET_INTERNAL_H
-#define BABELTRACE_INTEGER_RANGE_SET_INTERNAL_H
+#ifndef BABELTRACE_LIB_INTEGER_RANGE_SET_H
+#define BABELTRACE_LIB_INTEGER_RANGE_SET_H
 
 #include <stdbool.h>
 #include <glib.h>
 
 #include <stdbool.h>
 #include <glib.h>
@@ -53,4 +53,4 @@ bool bt_integer_range_set_unsigned_has_overlaps(
 bool bt_integer_range_set_signed_has_overlaps(
                const struct bt_integer_range_set *range_set);
 
 bool bt_integer_range_set_signed_has_overlaps(
                const struct bt_integer_range_set *range_set);
 
-#endif /* BABELTRACE_INTEGER_RANGE_SET_INTERNAL_H */
+#endif /* BABELTRACE_LIB_INTEGER_RANGE_SET_H */
index a22e000f0ee3f56ca0b6140e1446768c5cc29600..6d98a0ce5e0dc38d87949f20e6559c27000dd01b 100644 (file)
@@ -497,8 +497,8 @@ static inline void format_trace(char **buf_ch, bool extended,
 {
        char tmp_prefix[TMP_PREFIX_LEN];
 
 {
        char tmp_prefix[TMP_PREFIX_LEN];
 
-       if (trace->name.value) {
-               BUF_APPEND(", %sname=\"%s\"", PRFIELD(trace->name.value));
+       if (trace->name) {
+               BUF_APPEND(", %sname=\"%s\"", PRFIELD(trace->name));
        }
 
        if (!extended) {
        }
 
        if (!extended) {
@@ -534,9 +534,9 @@ static inline void format_stream_class(char **buf_ch, bool extended,
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(stream_class->id));
 
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(stream_class->id));
 
-       if (stream_class->name.value) {
+       if (stream_class->name) {
                BUF_APPEND(", %sname=\"%s\"",
                BUF_APPEND(", %sname=\"%s\"",
-                       PRFIELD(stream_class->name.value));
+                       PRFIELD(stream_class->name));
        }
 
        if (!extended) {
        }
 
        if (!extended) {
@@ -593,9 +593,9 @@ static inline void format_event_class(char **buf_ch, bool extended,
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(event_class->id));
 
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(event_class->id));
 
-       if (event_class->name.value) {
+       if (event_class->name) {
                BUF_APPEND(", %sname=\"%s\"",
                BUF_APPEND(", %sname=\"%s\"",
-                       PRFIELD(event_class->name.value));
+                       PRFIELD(event_class->name));
        }
 
        if (!extended) {
        }
 
        if (!extended) {
@@ -610,9 +610,9 @@ static inline void format_event_class(char **buf_ch, bool extended,
                                (int) event_class->log_level.value)));
        }
 
                                (int) event_class->log_level.value)));
        }
 
-       if (event_class->emf_uri.value) {
+       if (event_class->emf_uri) {
                BUF_APPEND(", %semf-uri=\"%s\"",
                BUF_APPEND(", %semf-uri=\"%s\"",
-                       PRFIELD(event_class->emf_uri.value));
+                       PRFIELD(event_class->emf_uri));
        }
 
        BUF_APPEND(", %sspecific-context-fc-addr=%p, %spayload-fc-addr=%p",
        }
 
        BUF_APPEND(", %sspecific-context-fc-addr=%p, %spayload-fc-addr=%p",
@@ -649,8 +649,8 @@ static inline void format_stream(char **buf_ch, bool extended,
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(stream->id));
 
 
        BUF_APPEND(", %sid=%" PRIu64, PRFIELD(stream->id));
 
-       if (stream->name.value) {
-               BUF_APPEND(", %sname=\"%s\"", PRFIELD(stream->name.value));
+       if (stream->name) {
+               BUF_APPEND(", %sname=\"%s\"", PRFIELD(stream->name));
        }
 
        if (!extended) {
        }
 
        if (!extended) {
@@ -777,8 +777,8 @@ static inline void format_clock_class(char **buf_ch, bool extended,
 {
        char tmp_prefix[TMP_PREFIX_LEN];
 
 {
        char tmp_prefix[TMP_PREFIX_LEN];
 
-       if (clock_class->name.value) {
-               BUF_APPEND(", %sname=\"%s\"", PRFIELD(clock_class->name.value));
+       if (clock_class->name) {
+               BUF_APPEND(", %sname=\"%s\"", PRFIELD(clock_class->name));
        }
 
        BUF_APPEND(", %sfreq=%" PRIu64, PRFIELD(clock_class->frequency));
        }
 
        BUF_APPEND(", %sfreq=%" PRIu64, PRFIELD(clock_class->frequency));
@@ -787,9 +787,9 @@ static inline void format_clock_class(char **buf_ch, bool extended,
                return;
        }
 
                return;
        }
 
-       if (clock_class->description.value) {
+       if (clock_class->description) {
                BUF_APPEND(", %spartial-descr=\"%.32s\"",
                BUF_APPEND(", %spartial-descr=\"%.32s\"",
-                       PRFIELD(clock_class->description.value));
+                       PRFIELD(clock_class->description));
        }
 
        if (clock_class->uuid.value) {
        }
 
        if (clock_class->uuid.value) {
index aa4fc5e501e7748ae6b578d2bf0268907b3aed58..669b41bcc9fb17010fb75998b7ed3c5c63989d78 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_LIB_LOGGING_INTERNAL_H
-#define BABELTRACE_LIB_LOGGING_INTERNAL_H
+#ifndef BABELTRACE_LIB_LOGGING_H
+#define BABELTRACE_LIB_LOGGING_H
 
 #include <stdarg.h>
 
 
 #include <stdarg.h>
 
@@ -86,4 +86,4 @@ void bt_lib_maybe_log_and_append_cause(const char *func, const char *file,
 
 #define BT_LIB_LOG_SUPPORTED
 
 
 #define BT_LIB_LOG_SUPPORTED
 
-#endif /* BABELTRACE_LIB_LOGGING_INTERNAL_H */
+#endif /* BABELTRACE_LIB_LOGGING_H */
index e0501daf70b47a075695c4939f3e8b28965b4708..c1558de1fe6829dfb0aa96e43de925fe809124d4 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_OBJECT_POOL_INTERNAL_H
-#define BABELTRACE_OBJECT_POOL_INTERNAL_H
+#ifndef BABELTRACE_LIB_OBJECT_POOL_H
+#define BABELTRACE_LIB_OBJECT_POOL_H
 
 /*
  * This is a generic object pool to avoid memory allocation/deallocation
 
 /*
  * This is a generic object pool to avoid memory allocation/deallocation
@@ -151,4 +151,4 @@ void bt_object_pool_recycle_object(struct bt_object_pool *pool, void *obj)
                pool, pool->size, pool->objects->len, obj);
 }
 
                pool, pool->size, pool->objects->len, obj);
 }
 
-#endif /* BABELTRACE_OBJECT_POOL_INTERNAL_H */
+#endif /* BABELTRACE_LIB_OBJECT_POOL_H */
index 6531394a831484c13ce9a521e31a4e56bd89e61b..94b6e807f40b2124ffc5f6e6344d8f8965666242 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_OBJECT_INTERNAL_H
-#define BABELTRACE_OBJECT_INTERNAL_H
+#ifndef BABELTRACE_LIB_OBJECT_H
+#define BABELTRACE_LIB_OBJECT_H
 
 #include "common/assert.h"
 #include <stdbool.h>
 
 #include "common/assert.h"
 #include <stdbool.h>
@@ -347,4 +347,4 @@ void bt_object_put_ref(const void *ptr)
                (_var_src) = NULL;              \
        } while (0)
 
                (_var_src) = NULL;              \
        } while (0)
 
-#endif /* BABELTRACE_OBJECT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_OBJECT_H */
index 7d663e2061be3321cf09c43e91a25209abb94a16..525fe42415345c7fa74bfdf7f76db821fd900ba0 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_PLUGIN_SO_INTERNAL_H
-#define BABELTRACE_PLUGIN_PLUGIN_SO_INTERNAL_H
+#ifndef BABELTRACE_LIB_PLUGIN_PLUGIN_SO_H
+#define BABELTRACE_LIB_PLUGIN_PLUGIN_SO_H
 
 #include <glib.h>
 #include <gmodule.h>
 
 #include <glib.h>
 #include <gmodule.h>
@@ -45,4 +45,4 @@ int bt_plugin_so_create_all_from_static(bool fail_on_load_error,
 void bt_plugin_so_on_add_component_class(struct bt_plugin *plugin,
                struct bt_component_class *comp_class);
 
 void bt_plugin_so_on_add_component_class(struct bt_plugin *plugin,
                struct bt_component_class *comp_class);
 
-#endif /* BABELTRACE_PLUGIN_PLUGIN_SO_INTERNAL_H */
+#endif /* BABELTRACE_LIB_PLUGIN_PLUGIN_SO_H */
index 60db3aaaf2d22b2ee69c676441dc04671815cf3d..a186e022d61e646f39e716e355a60417cea66720 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_PLUGIN_INTERNAL_H
-#define BABELTRACE_PLUGIN_PLUGIN_INTERNAL_H
+#ifndef BABELTRACE_LIB_PLUGIN_PLUGIN_H
+#define BABELTRACE_LIB_PLUGIN_PLUGIN_H
 
 #include "common/common.h"
 #include "lib/graph/component-class.h"
 
 #include "common/common.h"
 #include "lib/graph/component-class.h"
@@ -446,4 +446,4 @@ end:
        return;
 }
 
        return;
 }
 
-#endif /* BABELTRACE_PLUGIN_PLUGIN_INTERNAL_H */
+#endif /* BABELTRACE_LIB_PLUGIN_PLUGIN_H */
index 685568c79ca927dee11c91457616bff537848779..93f2b2700615d9301079c1c37d4e0866c043c9a3 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PROPERTY_INTERNAL_H
-#define BABELTRACE_PROPERTY_INTERNAL_H
+#ifndef BABELTRACE_LIB_PROPERTY_H
+#define BABELTRACE_LIB_PROPERTY_H
 
 #include "common/assert.h"
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
 #include <babeltrace2/babeltrace.h>
@@ -38,4 +38,4 @@ void bt_property_uint_init(struct bt_property_uint *prop,
        prop->value = value;
 }
 
        prop->value = value;
 }
 
-#endif /* BABELTRACE_PROPERTY_INTERNAL_H */
+#endif /* BABELTRACE_LIB_PROPERTY_H */
index 2920f383fc394b3d2792bc3d154c74b22b0d12af..ab7aa6e3a1b4f2af6b2e34d65b9fa052b5eabac0 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
  */
 
  * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
  */
 
-#ifndef BABELTRACE_TRACE_IR_ATTRIBUTES_H
-#define BABELTRACE_TRACE_IR_ATTRIBUTES_H
+#ifndef BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H
+#define BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H
 
 #ifdef __cplusplus
 extern "C" {
 
 #ifdef __cplusplus
 extern "C" {
@@ -40,4 +40,4 @@ int bt_attributes_freeze(const struct bt_value *attr_obj);
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_TRACE_IR_ATTRIBUTES_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H */
index 10030155b5c1ece5ad791f803bfae618c0d13f99..886501ec3b0944888cdea1ea5ce769bd965cf312 100644 (file)
@@ -35,18 +35,8 @@ void destroy_clock_class(struct bt_object *obj)
        BT_LIB_LOGD("Destroying clock class: %!+K", clock_class);
        BT_OBJECT_PUT_REF_AND_RESET(clock_class->user_attributes);
 
        BT_LIB_LOGD("Destroying clock class: %!+K", clock_class);
        BT_OBJECT_PUT_REF_AND_RESET(clock_class->user_attributes);
 
-       if (clock_class->name.str) {
-               g_string_free(clock_class->name.str, TRUE);
-               clock_class->name.str = NULL;
-               clock_class->name.value = NULL;
-       }
-
-       if (clock_class->description.str) {
-               g_string_free(clock_class->description.str, TRUE);
-               clock_class->description.str = NULL;
-               clock_class->description.value = NULL;
-       }
-
+       g_free(clock_class->name);
+       g_free(clock_class->description);
        bt_object_pool_finalize(&clock_class->cs_pool);
        g_free(clock_class);
 }
        bt_object_pool_finalize(&clock_class->cs_pool);
        g_free(clock_class);
 }
@@ -91,18 +81,6 @@ struct bt_clock_class *bt_clock_class_create(bt_self_component *self_comp)
                goto error;
        }
 
                goto error;
        }
 
-       clock_class->name.str = g_string_new(NULL);
-       if (!clock_class->name.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
-
-       clock_class->description.str = g_string_new(NULL);
-       if (!clock_class->description.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
-
        clock_class->frequency = UINT64_C(1000000000);
        clock_class->origin_is_unix_epoch = BT_TRUE;
        set_base_offset(clock_class);
        clock_class->frequency = UINT64_C(1000000000);
        clock_class->origin_is_unix_epoch = BT_TRUE;
        set_base_offset(clock_class);
@@ -132,7 +110,7 @@ BT_EXPORT
 const char *bt_clock_class_get_name(const struct bt_clock_class *clock_class)
 {
        BT_ASSERT_PRE_DEV_CLK_CLS_NON_NULL(clock_class);
 const char *bt_clock_class_get_name(const struct bt_clock_class *clock_class)
 {
        BT_ASSERT_PRE_DEV_CLK_CLS_NON_NULL(clock_class);
-       return clock_class->name.value;
+       return clock_class->name;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -143,8 +121,8 @@ enum bt_clock_class_set_name_status bt_clock_class_set_name(
        BT_ASSERT_PRE_CLK_CLS_NON_NULL(clock_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_CLOCK_CLASS_HOT(clock_class);
        BT_ASSERT_PRE_CLK_CLS_NON_NULL(clock_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_CLOCK_CLASS_HOT(clock_class);
-       g_string_assign(clock_class->name.str, name);
-       clock_class->name.value = clock_class->name.str->str;
+       g_free(clock_class->name);
+       clock_class->name = g_strdup(name);
        BT_LIB_LOGD("Set clock class's name: %!+K", clock_class);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set clock class's name: %!+K", clock_class);
        return BT_FUNC_STATUS_OK;
 }
@@ -154,7 +132,7 @@ const char *bt_clock_class_get_description(
                const struct bt_clock_class *clock_class)
 {
        BT_ASSERT_PRE_DEV_CLK_CLS_NON_NULL(clock_class);
                const struct bt_clock_class *clock_class)
 {
        BT_ASSERT_PRE_DEV_CLK_CLS_NON_NULL(clock_class);
-       return clock_class->description.value;
+       return clock_class->description;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -165,8 +143,8 @@ enum bt_clock_class_set_description_status bt_clock_class_set_description(
        BT_ASSERT_PRE_CLK_CLS_NON_NULL(clock_class);
        BT_ASSERT_PRE_DESCR_NON_NULL(descr);
        BT_ASSERT_PRE_DEV_CLOCK_CLASS_HOT(clock_class);
        BT_ASSERT_PRE_CLK_CLS_NON_NULL(clock_class);
        BT_ASSERT_PRE_DESCR_NON_NULL(descr);
        BT_ASSERT_PRE_DEV_CLOCK_CLASS_HOT(clock_class);
-       g_string_assign(clock_class->description.str, descr);
-       clock_class->description.value = clock_class->description.str->str;
+       g_free(clock_class->description);
+       clock_class->description = g_strdup(descr);
        BT_LIB_LOGD("Set clock class's description: %!+K",
                clock_class);
        return BT_FUNC_STATUS_OK;
        BT_LIB_LOGD("Set clock class's description: %!+K",
                clock_class);
        return BT_FUNC_STATUS_OK;
index e2e90412c797f53e01cb5f279a8ac2f83b673b21..50df464b4e263e9ce7ea067ee9f806c3612187d6 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_CLOCK_CLASS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_CLOCK_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_CLOCK_CLASS_H
+#define BABELTRACE_LIB_TRACE_IR_CLOCK_CLASS_H
 
 #include <babeltrace2/trace-ir/clock-class.h>
 #include "lib/object.h"
 
 #include <babeltrace2/trace-ir/clock-class.h>
 #include "lib/object.h"
@@ -27,19 +27,8 @@ struct bt_clock_class {
        /* Owned by this */
        struct bt_value *user_attributes;
 
        /* Owned by this */
        struct bt_value *user_attributes;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } name;
-
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } description;
+       gchar *name;
+       gchar *description;
 
        uint64_t frequency;
        uint64_t precision;
 
        uint64_t frequency;
        uint64_t precision;
@@ -100,4 +89,4 @@ int bt_clock_class_clock_value_from_ns_from_origin(
                raw_value) ? BT_FUNC_STATUS_OVERFLOW_ERROR : BT_FUNC_STATUS_OK;
 }
 
                raw_value) ? BT_FUNC_STATUS_OVERFLOW_ERROR : BT_FUNC_STATUS_OK;
 }
 
-#endif /* BABELTRACE_TRACE_IR_CLOCK_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_CLOCK_CLASS_H */
index 860b4200d4e205ec11e7df7ba9643c7b05f25bd3..49dcd84de01ffbeda26ca15696679c92cc66ac36 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
-#define BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_CLOCK_SNAPSHOT_H
+#define BABELTRACE_LIB_TRACE_IR_CLOCK_SNAPSHOT_H
 
 #include "lib/object.h"
 #include <stdbool.h>
 
 #include "lib/object.h"
 #include <stdbool.h>
@@ -68,4 +68,4 @@ struct bt_clock_snapshot *bt_clock_snapshot_create(
 
 void bt_clock_snapshot_recycle(struct bt_clock_snapshot *clock_snapshot);
 
 
 void bt_clock_snapshot_recycle(struct bt_clock_snapshot *clock_snapshot);
 
-#endif /* BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_CLOCK_SNAPSHOT_H */
index 0d90717561ca9727a5eddcce141450de73edc87b..76ad226bf2b532425c2d8b2a372cf360c9a43dea 100644 (file)
@@ -41,16 +41,8 @@ void destroy_event_class(struct bt_object *obj)
        BT_LIB_LOGD("Destroying event class: %!+E", event_class);
        BT_OBJECT_PUT_REF_AND_RESET(event_class->user_attributes);
 
        BT_LIB_LOGD("Destroying event class: %!+E", event_class);
        BT_OBJECT_PUT_REF_AND_RESET(event_class->user_attributes);
 
-       if (event_class->name.str) {
-               g_string_free(event_class->name.str, TRUE);
-               event_class->name.str = NULL;
-       }
-
-       if (event_class->emf_uri.str) {
-               g_string_free(event_class->emf_uri.str, TRUE);
-               event_class->emf_uri.str = NULL;
-       }
-
+       g_free(event_class->name);
+       g_free(event_class->emf_uri);
        BT_LOGD_STR("Putting context field class.");
        BT_OBJECT_PUT_REF_AND_RESET(event_class->specific_context_fc);
        BT_LOGD_STR("Putting payload field class.");
        BT_LOGD_STR("Putting context field class.");
        BT_OBJECT_PUT_REF_AND_RESET(event_class->specific_context_fc);
        BT_LOGD_STR("Putting payload field class.");
@@ -119,17 +111,6 @@ struct bt_event_class *create_event_class_with_id(
        event_class->id = id;
        bt_property_uint_init(&event_class->log_level,
                        BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE, 0);
        event_class->id = id;
        bt_property_uint_init(&event_class->log_level,
                        BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE, 0);
-       event_class->name.str = g_string_new(NULL);
-       if (!event_class->name.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
-
-       event_class->emf_uri.str = g_string_new(NULL);
-       if (!event_class->emf_uri.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
 
        ret = bt_object_pool_initialize(&event_class->event_pool,
                (bt_object_pool_new_object_func) bt_event_new,
 
        ret = bt_object_pool_initialize(&event_class->event_pool,
                (bt_object_pool_new_object_func) bt_event_new,
@@ -187,7 +168,7 @@ BT_EXPORT
 const char *bt_event_class_get_name(const struct bt_event_class *event_class)
 {
        BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class);
 const char *bt_event_class_get_name(const struct bt_event_class *event_class)
 {
        BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class);
-       return event_class->name.value;
+       return event_class->name;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -198,8 +179,8 @@ enum bt_event_class_set_name_status bt_event_class_set_name(
        BT_ASSERT_PRE_EC_NON_NULL(event_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
        BT_ASSERT_PRE_EC_NON_NULL(event_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
-       g_string_assign(event_class->name.str, name);
-       event_class->name.value = event_class->name.str->str;
+       g_free(event_class->name);
+       event_class->name = g_strdup(name);
        BT_LIB_LOGD("Set event class's name: %!+E", event_class);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set event class's name: %!+E", event_class);
        return BT_FUNC_STATUS_OK;
 }
@@ -240,7 +221,7 @@ BT_EXPORT
 const char *bt_event_class_get_emf_uri(const struct bt_event_class *event_class)
 {
        BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class);
 const char *bt_event_class_get_emf_uri(const struct bt_event_class *event_class)
 {
        BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class);
-       return event_class->emf_uri.value;
+       return event_class->emf_uri;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -252,8 +233,8 @@ enum bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri(
        BT_ASSERT_PRE_EC_NON_NULL(event_class);
        BT_ASSERT_PRE_NON_NULL("emf-uri", emf_uri, "EMF URI");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
        BT_ASSERT_PRE_EC_NON_NULL(event_class);
        BT_ASSERT_PRE_NON_NULL("emf-uri", emf_uri, "EMF URI");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
-       g_string_assign(event_class->emf_uri.str, emf_uri);
-       event_class->emf_uri.value = event_class->emf_uri.str->str;
+       g_free(event_class->emf_uri);
+       event_class->emf_uri = g_strdup(emf_uri);
        BT_LIB_LOGD("Set event class's EMF URI: %!+E", event_class);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set event class's EMF URI: %!+E", event_class);
        return BT_FUNC_STATUS_OK;
 }
index 67d93695e84711c271c1a5fd012396fb8651ca19..5e1d50712158bb16b224b06887139a7c1ae4e648 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H
+#define BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <babeltrace2/trace-ir/field.h>
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <babeltrace2/trace-ir/field.h>
@@ -29,22 +29,12 @@ struct bt_event_class {
        /* Owned by this */
        struct bt_value *user_attributes;
 
        /* Owned by this */
        struct bt_value *user_attributes;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } name;
+       gchar *name;
 
        uint64_t id;
        struct bt_property_uint log_level;
 
 
        uint64_t id;
        struct bt_property_uint log_level;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } emf_uri;
+       gchar *emf_uri;
 
        /* Pool of `struct bt_event *` */
        struct bt_object_pool event_pool;
 
        /* Pool of `struct bt_event *` */
        struct bt_object_pool event_pool;
@@ -68,4 +58,4 @@ struct bt_stream_class *bt_event_class_borrow_stream_class_inline(
        return (void *) bt_object_borrow_parent(&event_class->base);
 }
 
        return (void *) bt_object_borrow_parent(&event_class->base);
 }
 
-#endif /* BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H */
index 53130c4ba52c5dfb9157b592d9118485b514b1cd..852113d4e08e99480b0a401ff1ab796f936ec433 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_EVENT_INTERNAL_H
-#define BABELTRACE_TRACE_IR_EVENT_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_EVENT_H
+#define BABELTRACE_LIB_TRACE_IR_EVENT_H
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
@@ -148,4 +148,4 @@ void bt_event_recycle(struct bt_event *event)
        bt_object_put_ref_no_null_check(&event_class->base);
 }
 
        bt_object_put_ref_no_null_check(&event_class->base);
 }
 
-#endif /* BABELTRACE_TRACE_IR_EVENT_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_EVENT_H */
index 289f3b0978bd752484ba94c2d160437cdae3632a..12f427493f63b1ebdeee6de0d666a0541aa352a2 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_FIELD_CLASSES_INTERNAL_H
-#define BABELTRACE_TRACE_IR_FIELD_CLASSES_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_FIELD_CLASS_H
+#define BABELTRACE_LIB_TRACE_IR_FIELD_CLASS_H
 
 #include <babeltrace2/trace-ir/clock-class.h>
 #include <babeltrace2/trace-ir/field-class.h>
 
 #include <babeltrace2/trace-ir/clock-class.h>
 #include <babeltrace2/trace-ir/field-class.h>
@@ -247,4 +247,4 @@ void _bt_named_field_class_freeze(const struct bt_named_field_class *named_fc);
 void bt_field_class_make_part_of_trace_class(
                const struct bt_field_class *field_class);
 
 void bt_field_class_make_part_of_trace_class(
                const struct bt_field_class *field_class);
 
-#endif /* BABELTRACE_TRACE_IR_FIELD_CLASSES_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_FIELD_CLASS_H */
index 79e9d8f17b26d091ba2bea736191759afd7b9d2c..41e523cc73eb8d7016c3ee673ec5512fecf446ba 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_TRACE_IR_FIELD_PATH_INTERNAL
-#define BABELTRACE_TRACE_IR_FIELD_PATH_INTERNAL
+#ifndef BABELTRACE_LIB_TRACE_IR_FIELD_PATH_H
+#define BABELTRACE_LIB_TRACE_IR_FIELD_PATH_H
 
 #include "lib/object.h"
 #include <babeltrace2/trace-ir/field-path.h>
 
 #include "lib/object.h"
 #include <babeltrace2/trace-ir/field-path.h>
@@ -71,4 +71,4 @@ const char *bt_field_path_item_type_string(enum bt_field_path_item_type type)
        }
 };
 
        }
 };
 
-#endif /* BABELTRACE_TRACE_IR_FIELD_PATH_INTERNAL */
+#endif /* BABELTRACE_LIB_TRACE_IR_FIELD_PATH_H */
index c80d6a30a84094f48b529fc4387313cafe010cee..0afcfb5e6a92fad545f282d18d8f5de6d3a1acd9 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_FIELD_WRAPPER_INTERNAL_H
-#define BABELTRACE_TRACE_IR_FIELD_WRAPPER_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_FIELD_WRAPPER_H
+#define BABELTRACE_LIB_TRACE_IR_FIELD_WRAPPER_H
 
 #include "lib/object-pool.h"
 #include "lib/object.h"
 
 #include "lib/object-pool.h"
 #include "lib/object.h"
@@ -26,4 +26,4 @@ void bt_field_wrapper_destroy(struct bt_field_wrapper *field);
 struct bt_field_wrapper *bt_field_wrapper_create(
                struct bt_object_pool *pool, struct bt_field_class *fc);
 
 struct bt_field_wrapper *bt_field_wrapper_create(
                struct bt_object_pool *pool, struct bt_field_class *fc);
 
-#endif /* BABELTRACE_TRACE_IR_FIELD_WRAPPER_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_FIELD_WRAPPER_H */
index 87446b26fc1b782baa1572ebb5234daae7372344..bf90380a6b6951def2aee37b773241348bf4c279 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_FIELDS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_FIELDS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_FIELD_H
+#define BABELTRACE_LIB_TRACE_IR_FIELD_H
 
 #include "lib/object.h"
 #include <babeltrace2/types.h>
 
 #include "lib/object.h"
 #include <babeltrace2/types.h>
@@ -161,4 +161,4 @@ struct bt_field *bt_field_create(struct bt_field_class *class);
 
 void bt_field_destroy(struct bt_field *field);
 
 
 void bt_field_destroy(struct bt_field *field);
 
-#endif /* BABELTRACE_TRACE_IR_FIELDS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_FIELD_H */
index c22e7c9f47beaf4083cea89b870a3b7e53e24247..e5292fd4675d3ef7cd3ab2d932638c19831b983a 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_PACKET_INTERNAL_H
-#define BABELTRACE_TRACE_IR_PACKET_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_PACKET_H
+#define BABELTRACE_LIB_TRACE_IR_PACKET_H
 
 #include <stdbool.h>
 #include <babeltrace2/trace-ir/clock-snapshot.h>
 
 #include <stdbool.h>
 #include <babeltrace2/trace-ir/clock-snapshot.h>
@@ -37,4 +37,4 @@ void bt_packet_recycle(struct bt_packet *packet);
 
 void bt_packet_destroy(struct bt_packet *packet);
 
 
 void bt_packet_destroy(struct bt_packet *packet);
 
-#endif /* BABELTRACE_TRACE_IR_PACKET_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_PACKET_H */
index a0df1cd5d47e7ae5409272db48fa14f6eb3481d7..1f8cced44692532cebfa198db5bf3be9efc0f557 100644 (file)
@@ -7,8 +7,8 @@
  * http://www.efficios.com/ctf
  */
 
  * http://www.efficios.com/ctf
  */
 
-#ifndef BABELTRACE_TRACE_IR_RESOLVE_FIELD_PATH_INTERNAL
-#define BABELTRACE_TRACE_IR_RESOLVE_FIELD_PATH_INTERNAL
+#ifndef BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_PATH_H
+#define BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_PATH_H
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <babeltrace2/trace-ir/field-path.h>
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <babeltrace2/trace-ir/field-path.h>
@@ -25,4 +25,4 @@ int bt_resolve_field_paths(struct bt_field_class *field_class,
                struct bt_resolve_field_path_context *ctx,
                const char *api_func);
 
                struct bt_resolve_field_path_context *ctx,
                const char *api_func);
 
-#endif /* BABELTRACE_TRACE_IR_RESOLVE_FIELD_PATH_INTERNAL */
+#endif /* BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_PATH_H */
index 08395849b03c9331fde5cfe8b7422d00ccb6f077..c997086101cee2a48707d976beb8fd4ff9d6be4e 100644 (file)
@@ -47,12 +47,7 @@ void destroy_stream_class(struct bt_object *obj)
                stream_class->event_classes = NULL;
        }
 
                stream_class->event_classes = NULL;
        }
 
-       if (stream_class->name.str) {
-               g_string_free(stream_class->name.str, TRUE);
-               stream_class->name.str = NULL;
-               stream_class->name.value = NULL;
-       }
-
+       g_free(stream_class->name);
        BT_LOGD_STR("Putting packet context field class.");
        BT_OBJECT_PUT_REF_AND_RESET(stream_class->packet_context_fc);
        BT_LOGD_STR("Putting event common context field class.");
        BT_LOGD_STR("Putting packet context field class.");
        BT_OBJECT_PUT_REF_AND_RESET(stream_class->packet_context_fc);
        BT_LOGD_STR("Putting event common context field class.");
@@ -117,12 +112,6 @@ struct bt_stream_class *create_stream_class_with_id(
                goto error;
        }
 
                goto error;
        }
 
-       stream_class->name.str = g_string_new(NULL);
-       if (!stream_class->name.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
-
        stream_class->id = id;
        stream_class->assigns_automatic_event_class_id = true;
        stream_class->assigns_automatic_stream_id = true;
        stream_class->id = id;
        stream_class->assigns_automatic_event_class_id = true;
        stream_class->assigns_automatic_stream_id = true;
@@ -203,7 +192,7 @@ BT_EXPORT
 const char *bt_stream_class_get_name(const struct bt_stream_class *stream_class)
 {
        BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class);
 const char *bt_stream_class_get_name(const struct bt_stream_class *stream_class)
 {
        BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class);
-       return stream_class->name.value;
+       return stream_class->name;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -215,8 +204,8 @@ enum bt_stream_class_set_name_status bt_stream_class_set_name(
        BT_ASSERT_PRE_SC_NON_NULL(stream_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class);
        BT_ASSERT_PRE_SC_NON_NULL(stream_class);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class);
-       g_string_assign(stream_class->name.str, name);
-       stream_class->name.value = stream_class->name.str->str;
+       g_free(stream_class->name);
+       stream_class->name = g_strdup(name);
        BT_LIB_LOGD("Set stream class's name: %!+S", stream_class);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set stream class's name: %!+S", stream_class);
        return BT_FUNC_STATUS_OK;
 }
index 771a5899197d22161e0098f7f95b4e4de05f25c5..7ebb1d02b34f552e0680998a1e014e5562114a70 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_STREAM_CLASS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_STREAM_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_STREAM_CLASS_H
+#define BABELTRACE_LIB_TRACE_IR_STREAM_CLASS_H
 
 #include "common/assert.h"
 #include <babeltrace2/trace-ir/stream-class.h>
 
 #include "common/assert.h"
 #include <babeltrace2/trace-ir/stream-class.h>
@@ -23,12 +23,7 @@ struct bt_stream_class {
        /* Owned by this */
        struct bt_value *user_attributes;
 
        /* Owned by this */
        struct bt_value *user_attributes;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } name;
+       gchar *name;
 
        uint64_t id;
        bool assigns_automatic_event_class_id;
 
        uint64_t id;
        bool assigns_automatic_event_class_id;
@@ -69,4 +64,4 @@ struct bt_trace_class *bt_stream_class_borrow_trace_class_inline(
        return (void *) bt_object_borrow_parent(&stream_class->base);
 }
 
        return (void *) bt_object_borrow_parent(&stream_class->base);
 }
 
-#endif /* BABELTRACE_TRACE_IR_STREAM_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_STREAM_CLASS_H */
index 7cb124f425bfe5661436d94a38169952e582f297..471623e8c0412bcabb03c96b1e5d13fca08af51e 100644 (file)
@@ -37,12 +37,7 @@ void destroy_stream(struct bt_object *obj)
        BT_LIB_LOGD("Destroying stream object: %!+s", stream);
        BT_OBJECT_PUT_REF_AND_RESET(stream->user_attributes);
 
        BT_LIB_LOGD("Destroying stream object: %!+s", stream);
        BT_OBJECT_PUT_REF_AND_RESET(stream->user_attributes);
 
-       if (stream->name.str) {
-               g_string_free(stream->name.str, TRUE);
-               stream->name.str = NULL;
-               stream->name.value = NULL;
-       }
-
+       g_free(stream->name);
        BT_LOGD_STR("Putting stream's class.");
        bt_object_put_ref(stream->class);
        bt_object_pool_finalize(&stream->packet_pool);
        BT_LOGD_STR("Putting stream's class.");
        bt_object_put_ref(stream->class);
        bt_object_pool_finalize(&stream->packet_pool);
@@ -114,12 +109,6 @@ struct bt_stream *create_stream_with_id(struct bt_stream_class *stream_class,
                goto error;
        }
 
                goto error;
        }
 
-       stream->name.str = g_string_new(NULL);
-       if (!stream->name.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
-               goto error;
-       }
-
        stream->id = id;
        ret = bt_object_pool_initialize(&stream->packet_pool,
                (bt_object_pool_new_object_func) bt_packet_new,
        stream->id = id;
        ret = bt_object_pool_initialize(&stream->packet_pool,
                (bt_object_pool_new_object_func) bt_packet_new,
@@ -211,7 +200,7 @@ BT_EXPORT
 const char *bt_stream_get_name(const struct bt_stream *stream)
 {
        BT_ASSERT_PRE_DEV_STREAM_NON_NULL(stream);
 const char *bt_stream_get_name(const struct bt_stream *stream)
 {
        BT_ASSERT_PRE_DEV_STREAM_NON_NULL(stream);
-       return stream->name.value;
+       return stream->name;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -222,8 +211,8 @@ enum bt_stream_set_name_status bt_stream_set_name(struct bt_stream *stream,
        BT_ASSERT_PRE_STREAM_NON_NULL(stream);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_STREAM_HOT(stream);
        BT_ASSERT_PRE_STREAM_NON_NULL(stream);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_STREAM_HOT(stream);
-       g_string_assign(stream->name.str, name);
-       stream->name.value = stream->name.str->str;
+       g_free(stream->name);
+       stream->name = g_strdup(name);
        BT_LIB_LOGD("Set stream's name: %!+s", stream);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set stream's name: %!+s", stream);
        return BT_FUNC_STATUS_OK;
 }
index 89d7bf73afd47e3018e16d2290981f69f82abc10..250f7948eb59a828897b4d206dbc5380c0e11468 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
-#define BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_STREAM_H
+#define BABELTRACE_LIB_TRACE_IR_STREAM_H
 
 #include <babeltrace2/trace-ir/stream.h>
 #include "lib/object.h"
 
 #include <babeltrace2/trace-ir/stream.h>
 #include "lib/object.h"
@@ -26,12 +26,7 @@ struct bt_stream {
        /* Owned by this */
        struct bt_stream_class *class;
 
        /* Owned by this */
        struct bt_stream_class *class;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } name;
+       gchar *name;
 
        uint64_t id;
 
 
        uint64_t id;
 
@@ -56,4 +51,4 @@ struct bt_trace *bt_stream_borrow_trace_inline(const struct bt_stream *stream)
        return (void *) bt_object_borrow_parent(&stream->base);
 }
 
        return (void *) bt_object_borrow_parent(&stream->base);
 }
 
-#endif /* BABELTRACE_TRACE_IR_STREAM_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_STREAM_H */
index 8df87e970629ca458a3a8ebf5a4ee171185ccb39..3484ffc24ba4724760f96599bdf27c2d63201013 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_TRACE_CLASS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_TRACE_CLASS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_TRACE_CLASS_H
+#define BABELTRACE_LIB_TRACE_IR_TRACE_CLASS_H
 
 #include <babeltrace2/trace-ir/trace-class.h>
 #include <babeltrace2/trace-ir/field-class.h>
 
 #include <babeltrace2/trace-ir/trace-class.h>
 #include <babeltrace2/trace-ir/field-class.h>
@@ -40,4 +40,4 @@ void _bt_trace_class_freeze(const struct bt_trace_class *trace_class);
 # define bt_trace_class_freeze(_tc)
 #endif
 
 # define bt_trace_class_freeze(_tc)
 #endif
 
-#endif /* BABELTRACE_TRACE_IR_TRACE_CLASS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_TRACE_CLASS_H */
index 8cc005a785530654984cd837d5e2a7e7107212c4..ef9581ee0e6d01f175eed5de0d45b01f6698ed48 100644 (file)
@@ -105,11 +105,7 @@ void destroy_trace(struct bt_object *obj)
                }
        }
 
                }
        }
 
-       if (trace->name.str) {
-               g_string_free(trace->name.str, TRUE);
-               trace->name.str = NULL;
-               trace->name.value = NULL;
-       }
+       g_free(trace->name);
 
        if (trace->environment) {
                BT_LOGD_STR("Destroying environment attributes.");
 
        if (trace->environment) {
                BT_LOGD_STR("Destroying environment attributes.");
@@ -170,12 +166,6 @@ struct bt_trace *bt_trace_create(struct bt_trace_class *tc)
                goto error;
        }
 
                goto error;
        }
 
-       trace->name.str = g_string_new(NULL);
-       if (!trace->name.str) {
-               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one GString.");
-               goto error;
-       }
-
        trace->environment = bt_attributes_create();
        if (!trace->environment) {
                BT_LIB_LOGE_APPEND_CAUSE("Cannot create empty attributes object.");
        trace->environment = bt_attributes_create();
        if (!trace->environment) {
                BT_LIB_LOGE_APPEND_CAUSE("Cannot create empty attributes object.");
@@ -205,7 +195,7 @@ BT_EXPORT
 const char *bt_trace_get_name(const struct bt_trace *trace)
 {
        BT_ASSERT_PRE_DEV_TRACE_NON_NULL(trace);
 const char *bt_trace_get_name(const struct bt_trace *trace)
 {
        BT_ASSERT_PRE_DEV_TRACE_NON_NULL(trace);
-       return trace->name.value;
+       return trace->name;
 }
 
 BT_EXPORT
 }
 
 BT_EXPORT
@@ -216,8 +206,8 @@ enum bt_trace_set_name_status bt_trace_set_name(struct bt_trace *trace,
        BT_ASSERT_PRE_TRACE_NON_NULL(trace);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_TRACE_HOT(trace);
        BT_ASSERT_PRE_TRACE_NON_NULL(trace);
        BT_ASSERT_PRE_NAME_NON_NULL(name);
        BT_ASSERT_PRE_DEV_TRACE_HOT(trace);
-       g_string_assign(trace->name.str, name);
-       trace->name.value = trace->name.str->str;
+       g_free(trace->name);
+       trace->name = g_strdup(name);
        BT_LIB_LOGD("Set trace's name: %!+t", trace);
        return BT_FUNC_STATUS_OK;
 }
        BT_LIB_LOGD("Set trace's name: %!+t", trace);
        return BT_FUNC_STATUS_OK;
 }
index 294e8943cd2ffb5933cb7a14888092e435f2b7a7..4ab18f1ba4f14cbd65bad46b3e111365f6ec8d6c 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_TRACE_INTERNAL_H
-#define BABELTRACE_TRACE_IR_TRACE_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_TRACE_H
+#define BABELTRACE_LIB_TRACE_IR_TRACE_H
 
 #include <babeltrace2/trace-ir/trace.h>
 #include <babeltrace2/trace-ir/field-class.h>
 
 #include <babeltrace2/trace-ir/trace.h>
 #include <babeltrace2/trace-ir/field-class.h>
@@ -31,12 +31,7 @@ struct bt_trace {
        /* Owned by this */
        struct bt_trace_class *class;
 
        /* Owned by this */
        struct bt_trace_class *class;
 
-       struct {
-               GString *str;
-
-               /* NULL or `str->str` above */
-               const char *value;
-       } name;
+       gchar *name;
 
        struct {
                bt_uuid_t uuid;
 
        struct {
                bt_uuid_t uuid;
@@ -74,4 +69,4 @@ void bt_trace_add_stream(struct bt_trace *trace, struct bt_stream *stream);
 uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace *trace,
                const struct bt_stream_class *stream_class);
 
 uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace *trace,
                const struct bt_stream_class *stream_class);
 
-#endif /* BABELTRACE_TRACE_IR_TRACE_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_TRACE_H */
index f9c2f6e3a4ba4ba8f4a700a244676e8b949addd7..8943ee24f9464528727f35fcd05cc19e300f8f95 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_TRACE_IR_UTILS_INTERNAL_H
-#define BABELTRACE_TRACE_IR_UTILS_INTERNAL_H
+#ifndef BABELTRACE_LIB_TRACE_IR_UTILS_H
+#define BABELTRACE_LIB_TRACE_IR_UTILS_H
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <stdbool.h>
 
 #include <babeltrace2/trace-ir/field-class.h>
 #include <stdbool.h>
@@ -155,4 +155,4 @@ bool bt_util_value_is_in_range_unsigned(unsigned int size, uint64_t value)
        return value <= max_value;
 }
 
        return value <= max_value;
 }
 
-#endif /* BABELTRACE_TRACE_IR_UTILS_INTERNAL_H */
+#endif /* BABELTRACE_LIB_TRACE_IR_UTILS_H */
index 34b7a40ad89957ff411b062dab1db35dfaaf5cd2..68cd907ecea4cda9c6f6977f28f36a1bd4e9a2a9 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2015-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (c) 2015-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_VALUES_INTERNAL_H
-#define BABELTRACE_VALUES_INTERNAL_H
+#ifndef BABELTRACE_LIB_VALUE_H
+#define BABELTRACE_LIB_VALUE_H
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
@@ -59,4 +59,4 @@ void _bt_value_freeze(const struct bt_value *object);
 # define bt_value_freeze(_value)
 #endif /* BT_DEV_MODE */
 
 # define bt_value_freeze(_value)
 #endif /* BT_DEV_MODE */
 
-#endif /* BABELTRACE_VALUES_INTERNAL_H */
+#endif /* BABELTRACE_LIB_VALUE_H */
index 8ca0e3eb4b1da8da582bd4979396fd8fe63cc1b3..d53b4177cba4ee5805ec2e4f9e6d6938ce98d05f 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef SRC_PARAMS_PARSE_VALUE_PARSE_H
-#define SRC_PARAMS_PARSE_VALUE_PARSE_H
+#ifndef BABELTRACE_PARAM_PARSE_PARAM_PARSE_H
+#define BABELTRACE_PARAM_PARSE_PARAM_PARSE_H
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -15,4 +15,4 @@
 
 bt_value *bt_param_parse(const char *arg, GString *ini_error);
 
 
 bt_value *bt_param_parse(const char *arg, GString *ini_error);
 
-#endif /* SRC_VALUE_PARSE_VALUE_PARSE_H */
+#endif /* BABELTRACE_PARAM_PARSE_PARAM_PARSE_H */
index d724f8a423c1728cd0a6e03391c2f3965e7c8b98..9f0e913e87d5ae72d816572b90abf977d388ce0e 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
  */
 
  * Copyright 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_COMMON_MUXING_H
-#define BABELTRACE_PLUGIN_COMMON_MUXING_H
+#ifndef BABELTRACE_PLUGINS_COMMON_MUXING_MUXING_H
+#define BABELTRACE_PLUGINS_COMMON_MUXING_MUXING_H
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -14,4 +14,4 @@ BT_EXTERN_C
 int common_muxing_compare_messages(const bt_message *left_msg,
                const bt_message *right_msg);
 
 int common_muxing_compare_messages(const bt_message *left_msg,
                const bt_message *right_msg);
 
-#endif /* BABELTRACE_PLUGIN_COMMON_MUXING_H */
+#endif /* BABELTRACE_PLUGINS_COMMON_MUXING_MUXING_H */
index 40d5760998d533d260be87e379a024b429b402b0..8361b593473601386ffd37ed3e643124a5cbbbea 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright 2019 EfficiOS Inc.
  */
  *
  * Copyright 2019 EfficiOS Inc.
  */
+
 #ifndef BABELTRACE_PLUGINS_COMMON_PARAM_VALIDATION_PARAM_VALIDATION_H
 #define BABELTRACE_PLUGINS_COMMON_PARAM_VALIDATION_PARAM_VALIDATION_H
 
 #ifndef BABELTRACE_PLUGINS_COMMON_PARAM_VALIDATION_PARAM_VALIDATION_H
 #define BABELTRACE_PLUGINS_COMMON_PARAM_VALIDATION_PARAM_VALIDATION_H
 
index 984b695c401d59840f0a5088b67eeb6638e13904..f43f2109d69fea6ca8c0574b63ae2d52d8e2310f 100644 (file)
@@ -7,8 +7,8 @@
  * Babeltrace - CTF binary field class reader (BFCR)
  */
 
  * Babeltrace - CTF binary field class reader (BFCR)
  */
 
-#ifndef CTF_BFCR_H
-#define CTF_BFCR_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_BFCR_BFCR_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_BFCR_BFCR_HPP
 
 #include <stddef.h>
 #include <stdint.h>
 
 #include <stddef.h>
 #include <stdint.h>
@@ -355,4 +355,4 @@ size_t bt_bfcr_continue(struct bt_bfcr *bfcr, const uint8_t *buf, size_t sz,
 
 void bt_bfcr_set_unsigned_int_cb(struct bt_bfcr *bfcr, bt_bfcr_unsigned_int_cb_func cb);
 
 
 void bt_bfcr_set_unsigned_int_cb(struct bt_bfcr *bfcr, bt_bfcr_unsigned_int_cb_func cb);
 
-#endif /* CTF_BFCR_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_BFCR_BFCR_HPP */
index 0c3b52d7c46bf15bcf9b333a5cd7e564b6ea7a20..e46b66e5dc4076be3e545551d16d18c0e393c126 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2022 EfficiOS Inc. and Linux Foundation
  */
 
  * Copyright (c) 2022 EfficiOS Inc. and Linux Foundation
  */
 
-#ifndef CTF_COMMON_SRC_CLK_CLS_CFG_HPP
-#define CTF_COMMON_SRC_CLK_CLS_CFG_HPP
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_CLK_CLS_CFG_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_CLK_CLS_CFG_HPP
 
 #include <cstdint>
 
 
 #include <cstdint>
 
@@ -22,4 +22,4 @@ struct ClkClsCfg
 } /* namespace src */
 } /* namespace ctf */
 
 } /* namespace src */
 } /* namespace ctf */
 
-#endif /* CTF_COMMON_SRC_CLK_CLS_CFG_HPP */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_CLK_CLS_CFG_HPP */
index 597cb3a4e470a32cc16e9811ba72d5dc26e774a2..93bfe8bcf7ad32fb269be418d8c86e0820160da7 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _CTF_AST_H
-#define _CTF_AST_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_AST_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_AST_HPP
 
 #include <memory>
 
 
 #include <memory>
 
@@ -608,4 +608,4 @@ end:
     return ret;
 }
 
     return ret;
 }
 
-#endif /* _CTF_AST_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_AST_HPP */
index 2adffb5394aad2cb208fa5625796e51beb5d15c8..3ce3fa964679e9f64571f2936745c90122ce60ec 100644 (file)
@@ -4,11 +4,11 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef _CTF_META_CONFIGURE_IR_TRACE_H
-#define _CTF_META_CONFIGURE_IR_TRACE_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_CONFIGURE_IR_TRACE_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_CONFIGURE_IR_TRACE_HPP
 
 #include "cpp-common/bt2/trace-ir.hpp"
 
 void ctf_trace_class_configure_ir_trace(struct ctf_trace_class *tc, bt2::Trace ir_trace);
 
 
 #include "cpp-common/bt2/trace-ir.hpp"
 
 void ctf_trace_class_configure_ir_trace(struct ctf_trace_class *tc, bt2::Trace ir_trace);
 
-#endif /* _CTF_META_CONFIGURE_IR_TRACE_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_CONFIGURE_IR_TRACE_HPP */
index 1a6f708f133a0a4850b90b0a78a12717d8b009fc..0b2e5b091983fdf3e58538ff33f4e0d0f395334f 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef _CTF_META_VISITORS_H
-#define _CTF_META_VISITORS_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_VISITORS_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_VISITORS_HPP
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -43,4 +43,4 @@ int ctf_trace_class_validate(struct ctf_trace_class *ctf_tc, const bt2c::Logger&
 void ctf_trace_class_warn_meaningless_header_fields(struct ctf_trace_class *ctf_tc,
                                                     const bt2c::Logger& parentLogger);
 
 void ctf_trace_class_warn_meaningless_header_fields(struct ctf_trace_class *ctf_tc,
                                                     const bt2c::Logger& parentLogger);
 
-#endif /* _CTF_META_VISITORS_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_VISITORS_HPP */
index 5efa71068b028db54f09412153d6ae79578d254b..541fba6dc981d427b4eed95b3dd7613d0f175415 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef _CTF_META_H
-#define _CTF_META_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_HPP
 
 #include <glib.h>
 #include <stdint.h>
 
 #include <glib.h>
 #include <stdint.h>
@@ -1773,4 +1773,4 @@ end:
     return ret_entry;
 }
 
     return ret_entry;
 }
 
-#endif /* _CTF_META_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_CTF_META_HPP */
index 6190b0615b68e97ed23d8c88abcc1421ebc39c39..b0d544c2a84c35b1d05d37eba78175de4ca1ec39 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Efficios Inc.
  */
 
  * Copyright 2019 Efficios Inc.
  */
 
-#ifndef SRC_PLUGINS_CTF_COMMON_METADATA_DECODER_PACKETIZED_FILE_STREAM_TO_BUF
-#define SRC_PLUGINS_CTF_COMMON_METADATA_DECODER_PACKETIZED_FILE_STREAM_TO_BUF
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_PACKETIZED_FILE_STREAM_TO_BUF_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_PACKETIZED_FILE_STREAM_TO_BUF_HPP
 
 #include <cstdio>
 
 
 #include <cstdio>
 
@@ -23,4 +23,4 @@ int ctf_metadata_decoder_packetized_file_stream_to_buf(FILE *fp, char **buf, int
                                                        bool *is_uuid_set, uint8_t *uuid,
                                                        const bt2c::Logger& parentLogger);
 
                                                        bool *is_uuid_set, uint8_t *uuid,
                                                        const bt2c::Logger& parentLogger);
 
-#endif /* SRC_PLUGINS_CTF_COMMON_METADATA_DECODER_PACKETIZED_FILE_STREAM_TO_BUF */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_PACKETIZED_FILE_STREAM_TO_BUF_HPP */
index b4dbce875dcb0d33a772eb2fb075ee1ae3338696..9d230fd38c5ee93c8b116fdc3f4f5b7e08a6b520 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef _METADATA_DECODER_H
-#define _METADATA_DECODER_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_HPP
 
 #include <stdio.h>
 
 
 #include <stdio.h>
 
@@ -191,4 +191,4 @@ static inline bool ctf_metadata_decoder_is_packet_version_valid(unsigned int maj
     return major == 1 && minor == 8;
 }
 
     return major == 1 && minor == 8;
 }
 
-#endif /* _METADATA_DECODER_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_DECODER_HPP */
index ee019a3c04cf9f78c2f2be8068878bf19f183dcc..e19e37f382311271ef7c7e64d40c3c5b46d06278 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright (c) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef CTF_METADATA_LOGGING_H
-#define CTF_METADATA_LOGGING_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_LOGGING_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_LOGGING_HPP
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -23,4 +23,4 @@
 #define _BT_CPPLOGE_APPEND_CAUSE_LINENO(logger, _lineno, _msg, args...)                            \
     BT_CPPLOGE_APPEND_CAUSE_SPEC((logger), "At line {} in metadata stream: " _msg, _lineno, ##args)
 
 #define _BT_CPPLOGE_APPEND_CAUSE_LINENO(logger, _lineno, _msg, args...)                            \
     BT_CPPLOGE_APPEND_CAUSE_SPEC((logger), "At line {} in metadata stream: " _msg, _lineno, ##args)
 
-#endif /* CTF_METADATA_LOGGING_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_LOGGING_HPP */
index cc17d433bfaaabaa8a8bb15b3ba95a2e40f3fb6c..511a411fce5c27283624a0e42ecb7148adef98f3 100644 (file)
@@ -6,8 +6,8 @@
  * Common Trace Format Object Stack.
  */
 
  * Common Trace Format Object Stack.
  */
 
-#ifndef _OBJSTACK_H
-#define _OBJSTACK_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_OBJSTACK_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_OBJSTACK_HPP
 
 #include <cstddef>
 
 
 #include <cstddef>
 
@@ -26,4 +26,4 @@ void objstack_destroy(struct objstack *objstack);
  */
 void *objstack_alloc(struct objstack *objstack, size_t len);
 
  */
 void *objstack_alloc(struct objstack *objstack, size_t len);
 
-#endif /* _OBJSTACK_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_OBJSTACK_HPP */
index bfc0e9070e8d60a668fa258888ebd5f56a637887..ba128994edeceb02c6ac9ad06446ab128db1ee93 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 EfficiOS Inc.
  */
 
  * Copyright 2019 EfficiOS Inc.
  */
 
-#ifndef BABELTRACE_PLUGINS_CTF_COMMON_METADATA_PARSER_WRAP_H
-#define BABELTRACE_PLUGINS_CTF_COMMON_METADATA_PARSER_WRAP_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_PARSER_WRAP_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_PARSER_WRAP_HPP
 
 /*
  * Small wrapper around the bison-generated parser.h to conditionally define
 
 /*
  * Small wrapper around the bison-generated parser.h to conditionally define
@@ -24,4 +24,4 @@
 #include "plugins/ctf/common/src/metadata/tsdl/parser.hpp"
 #undef ALLOW_INCLUDE_PARSER_H
 
 #include "plugins/ctf/common/src/metadata/tsdl/parser.hpp"
 #undef ALLOW_INCLUDE_PARSER_H
 
-#endif
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_PARSER_WRAP_HPP */
index 1f6f144dcd6ed3d1f55aae84d12caf0653170cd8..e274036697cf0e2def3e70fa801af3fb9669413e 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _CTF_SCANNER_SYMBOLS
-#define _CTF_SCANNER_SYMBOLS
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_SYMBOLS_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_SYMBOLS_HPP
 
 #define yy_create_buffer    bt_yy_create_buffer
 #define yy_delete_buffer    bt_yy_delete_buffer
 
 #define yy_create_buffer    bt_yy_create_buffer
 #define yy_delete_buffer    bt_yy_delete_buffer
@@ -37,4 +37,4 @@
 #define yyset_lval          bt_yyset_lval
 #define yyset_out           bt_yyset_out
 
 #define yyset_lval          bt_yyset_lval
 #define yyset_out           bt_yyset_out
 
-#endif /* _CTF_SCANNER_SYMBOLS */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_SYMBOLS_HPP */
index 4f2a1f8687f353e4e85ae8dc8ef024ae4f600d94..79933d5074da3112c0d86ecf3975c91748368343 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _CTF_SCANNER_H
-#define _CTF_SCANNER_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_HPP
 
 #include <stdio.h>
 
 
 #include <stdio.h>
 
@@ -51,4 +51,4 @@ static inline struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
 
 int is_type(struct ctf_scanner *scanner, const char *id);
 
 
 int is_type(struct ctf_scanner *scanner, const char *id);
 
-#endif /* _CTF_SCANNER_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_METADATA_TSDL_SCANNER_HPP */
index f9bb7f2aa01761a932d2c8a08f8f1b49b5131b0d..b375b0d86c551044b2aa37b7e64b6cfc7795ef67 100644 (file)
@@ -7,8 +7,8 @@
  * Babeltrace - CTF message iterator
  */
 
  * Babeltrace - CTF message iterator
  */
 
-#ifndef CTF_MSG_ITER_H
-#define CTF_MSG_ITER_H
+#ifndef BABELTRACE_PLUGINS_CTF_COMMON_SRC_MSG_ITER_MSG_ITER_HPP
+#define BABELTRACE_PLUGINS_CTF_COMMON_SRC_MSG_ITER_MSG_ITER_HPP
 
 #include <stddef.h>
 #include <stdint.h>
 
 #include <stddef.h>
 #include <stdint.h>
@@ -362,4 +362,4 @@ void ctf_msg_iter_reset_for_next_stream_file(struct ctf_msg_iter *msg_it);
 
 void ctf_msg_iter_set_dry_run(struct ctf_msg_iter *msg_it, bool val);
 
 
 void ctf_msg_iter_set_dry_run(struct ctf_msg_iter *msg_it, bool val);
 
-#endif /* CTF_MSG_ITER_H */
+#endif /* BABELTRACE_PLUGINS_CTF_COMMON_SRC_MSG_ITER_MSG_ITER_HPP */
index 7161fb35c52770c06d20988578e48876970f58e4..440fca726707c6317feed2d267b55fbab40b06f9 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2018-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2018-2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_CTF_META_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_CTF_META_HPP
 
 #include <glib.h>
 #include <stdint.h>
 
 #include <glib.h>
 #include <stdint.h>
@@ -935,4 +935,4 @@ static inline struct fs_sink_ctf_trace *fs_sink_ctf_trace_create(const bt_trace
     return trace;
 }
 
     return trace;
 }
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_CTF_META_HPP */
index 8c309525c5619f55b1643cc5c148cadb9c8f3781..b30f7751ebd70c5a5f63e9b1d86e9a78d236f04c 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_STREAM_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_STREAM_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_STREAM_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_STREAM_HPP
 
 #include <glib.h>
 #include <stdint.h>
 
 #include <glib.h>
 #include <stdint.h>
@@ -179,4 +179,4 @@ int fs_sink_stream_open_packet(struct fs_sink_stream *stream, const bt_clock_sna
 
 int fs_sink_stream_close_packet(struct fs_sink_stream *stream, const bt_clock_snapshot *cs);
 
 
 int fs_sink_stream_close_packet(struct fs_sink_stream *stream, const bt_clock_snapshot *cs);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_STREAM_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_STREAM_HPP */
index c9b164367f46158d4fde85f78176754cbad3acbc..ac558b97918c1b5cde86da29026da3aaf4abe9e4 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_TRACE_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_TRACE_HPP
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -62,4 +62,4 @@ struct fs_sink_trace *fs_sink_trace_create(struct fs_sink_comp *fs_sink, const b
 
 void fs_sink_trace_destroy(struct fs_sink_trace *trace);
 
 
 void fs_sink_trace_destroy(struct fs_sink_trace *trace);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_TRACE_HPP */
index 529ae346027a4b0a3f544a6864077668d5777655..71a1574558f9c7a4e56fe2400b17cba35d4120ed 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -67,4 +67,4 @@ ctf_fs_sink_graph_is_configured(bt_self_component_sink *component);
 
 void ctf_fs_sink_finalize(bt_self_component_sink *component);
 
 
 void ctf_fs_sink_finalize(bt_self_component_sink *component);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP */
index 1efe100f3e9046c559c4fde81ee3ccba60ea6cff..a3658d6575541a7a6b5d64a490d20b26c9643167 100644 (file)
@@ -4,11 +4,11 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_HPP
 
 #include <glib.h>
 
 void translate_trace_ctf_ir_to_tsdl(struct fs_sink_ctf_trace *trace, GString *tsdl);
 
 
 #include <glib.h>
 
 void translate_trace_ctf_ir_to_tsdl(struct fs_sink_ctf_trace *trace, GString *tsdl);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_HPP */
index 5a3fda6c456b5dcf4a6633731e2cda265e5c8cca..b371ab6345cc6a171e891f8768bf334559254811 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_HPP
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -22,4 +22,4 @@ int try_translate_stream_class_trace_ir_to_ctf_ir(struct fs_sink_comp *fs_sink,
 struct fs_sink_ctf_trace *translate_trace_trace_ir_to_ctf_ir(struct fs_sink_comp *fs_sink,
                                                              const bt_trace *ir_trace);
 
 struct fs_sink_ctf_trace *translate_trace_trace_ir_to_ctf_ir(struct fs_sink_comp *fs_sink,
                                                              const bt_trace *ir_trace);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_HPP */
index 05a6db13538049d4ab194dd0695e03fa9a3f852e..eb20944d0042efc77dbeaaee18d50e6a138cd530 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CTF_FS_DS_FILE_H
-#define CTF_FS_DS_FILE_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_DATA_STREAM_FILE_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_DATA_STREAM_FILE_HPP
 
 #include <memory>
 #include <string>
 
 #include <memory>
 #include <string>
@@ -201,4 +201,4 @@ ctf_fs_ds_group_medops_data_create(struct ctf_fs_ds_file_group *ds_file_group,
 
 void ctf_fs_ds_group_medops_data_reset(struct ctf_fs_ds_group_medops_data *data);
 
 
 void ctf_fs_ds_group_medops_data_reset(struct ctf_fs_ds_group_medops_data *data);
 
-#endif /* CTF_FS_DS_FILE_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_DATA_STREAM_FILE_HPP */
index ee6441cbe6bdaa9c8887d49ec7e30e5baea6d1aa..5516f44c670d2e65f5c0f3a4d3bebd8a6db50465 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CTF_FS_FILE_H
-#define CTF_FS_FILE_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_FILE_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_FILE_HPP
 
 #include <memory>
 #include <string>
 
 #include <memory>
 #include <string>
@@ -35,4 +35,4 @@ struct ctf_fs_file
 
 int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode);
 
 
 int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode);
 
-#endif /* CTF_FS_FILE_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_FILE_HPP */
index c9ca2a90be0dd093086a89c6ced1f38d3eaedfa7..4f7837d693d1c1887224a1828a83c28391d4b624 100644 (file)
@@ -7,8 +7,8 @@
  * BabelTrace - CTF on File System Component
  */
 
  * BabelTrace - CTF on File System Component
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_H
-#define BABELTRACE_PLUGIN_CTF_FS_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_FS_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_FS_HPP
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -95,8 +95,8 @@ struct ctf_fs_msg_iter_data
     using UP = std::unique_ptr<ctf_fs_msg_iter_data>;
 
     explicit ctf_fs_msg_iter_data(bt_self_message_iterator *selfMsgIter) :
     using UP = std::unique_ptr<ctf_fs_msg_iter_data>;
 
     explicit ctf_fs_msg_iter_data(bt_self_message_iterator *selfMsgIter) :
-        self_msg_iter {selfMsgIter}, logger {bt2::SelfMessageIterator {self_msg_iter},
-                                             "PLUGIN/SRC.CTF.FS/MSG-ITER"}
+        self_msg_iter {selfMsgIter},
+        logger {bt2::SelfMessageIterator {self_msg_iter}, "PLUGIN/SRC.CTF.FS/MSG-ITER"}
     {
     }
 
     {
     }
 
@@ -199,4 +199,4 @@ ctf::src::fs::Parameters read_src_fs_parameters(bt2::ConstMapValue params,
 
 std::string ctf_fs_make_port_name(ctf_fs_ds_file_group *ds_file_group);
 
 
 std::string ctf_fs_make_port_name(ctf_fs_ds_file_group *ds_file_group);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_FS_HPP */
index 36dc7cc934d46366aa12ebf7b13f239e8699eacb..3faccb097d2793adfe547e40b1a5e83d6d4f2de5 100644 (file)
@@ -6,8 +6,8 @@
  * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  */
 
  * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  */
 
-#ifndef LTTNG_INDEX_H
-#define LTTNG_INDEX_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_LTTNG_INDEX_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_LTTNG_INDEX_HPP
 
 #include <cstdint>
 
 
 #include <cstdint>
 
@@ -49,4 +49,4 @@ struct ctf_packet_index
     uint64_t packet_seq_num;     /* packet sequence number */
 } __attribute__((__packed__));
 
     uint64_t packet_seq_num;     /* packet sequence number */
 } __attribute__((__packed__));
 
-#endif /* LTTNG_INDEX_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_LTTNG_INDEX_HPP */
index 14d7cc191f19f152df8f0e25921cbb786612957f..bab69e26c375e94f7eda928f895ec12172eef33d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef CTF_FS_METADATA_H
-#define CTF_FS_METADATA_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_METADATA_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_METADATA_HPP
 
 #include <stdio.h>
 
 
 #include <stdio.h>
 
@@ -28,4 +28,4 @@ FILE *ctf_fs_metadata_open_file(const char *trace_path, const bt2c::Logger& logg
 
 bool ctf_metadata_is_packetized(FILE *fp, int *byte_order);
 
 
 bool ctf_metadata_is_packetized(FILE *fp, int *byte_order);
 
-#endif /* CTF_FS_METADATA_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_METADATA_HPP */
index 0b700e91250458ba0df0c8d05522b5747356d753..4143f9c0888ffb6a2872189bfbc7fdf339e1cf15 100644 (file)
@@ -74,7 +74,7 @@ bt2::Value::Shared metadata_info_query(const bt2::ConstMapValue params, const bt
     ctf_metadata_decoder_up decoder = ctf_metadata_decoder_create(&decoder_cfg);
     if (!decoder) {
         BT_CPPLOGE_APPEND_CAUSE_AND_THROW_SPEC(
     ctf_metadata_decoder_up decoder = ctf_metadata_decoder_create(&decoder_cfg);
     if (!decoder) {
         BT_CPPLOGE_APPEND_CAUSE_AND_THROW_SPEC(
-            logger, bt2::Error, "Cannot create metadata decoder: path=\"{}}\".", path);
+            logger, bt2::Error, "Cannot create metadata decoder: path=\"{}\".", path);
     }
 
     rewind(metadataFp.get());
     }
 
     rewind(metadataFp.get());
index 2c7aca09ecc5d07f207e434c70d9645ee4d07467..f5066120a5f5c7c39f1373960867c71435e1f4ed 100644 (file)
@@ -6,8 +6,8 @@
  * BabelTrace - CTF on File System Component
  */
 
  * BabelTrace - CTF on File System Component
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_QUERY_H
-#define BABELTRACE_PLUGIN_CTF_FS_QUERY_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SRC_QUERY_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SRC_QUERY_HPP
 
 #include "cpp-common/bt2/value.hpp"
 
 
 #include "cpp-common/bt2/value.hpp"
 
@@ -23,4 +23,4 @@ bt2::Value::Shared trace_infos_query(bt2::ConstMapValue params, const bt2c::Logg
 
 bt2::Value::Shared support_info_query(bt2::ConstMapValue params, const bt2c::Logger& logger);
 
 
 bt2::Value::Shared support_info_query(bt2::ConstMapValue params, const bt2c::Logger& logger);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_QUERY_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SRC_QUERY_HPP */
index 675bbdbbaae51e7cf36c535999a7d6744d60878e..9ad85bba60b95a8175047c8375d0fad86ae34de4 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef LTTNG_LIVE_DATA_STREAM_H
-#define LTTNG_LIVE_DATA_STREAM_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_DATA_STREAM_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_DATA_STREAM_HPP
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
@@ -18,4 +18,4 @@ struct lttng_live_stream_iterator *
 lttng_live_stream_iterator_create(struct lttng_live_session *session, uint64_t ctf_trace_id,
                                   uint64_t stream_id, bt_self_message_iterator *self_msg_iter);
 
 lttng_live_stream_iterator_create(struct lttng_live_session *session, uint64_t ctf_trace_id,
                                   uint64_t stream_id, bt_self_message_iterator *self_msg_iter);
 
-#endif /* LTTNG_LIVE_DATA_STREAM_H */
+#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_DATA_STREAM_HPP */
index 9dbc432abf3f527abc3ef64017b474aab2ddbc3d..be2689ce944d8e0efbfc9abc1a207afb95eb2069 100644 (file)
@@ -8,8 +8,8 @@
  * BabelTrace - LTTng-live client Component
  */
 
  * BabelTrace - LTTng-live client Component
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H
-#define BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP
 
 #include <glib.h>
 #include <stdint.h>
 
 #include <glib.h>
 #include <stdint.h>
@@ -451,4 +451,4 @@ bool lttng_live_graph_is_canceled(struct lttng_live_msg_iter *msg_iter);
 void lttng_live_stream_iterator_set_state(struct lttng_live_stream_iterator *stream_iter,
                                           enum lttng_live_stream_state new_state);
 
 void lttng_live_stream_iterator_set_state(struct lttng_live_stream_iterator *stream_iter,
                                           enum lttng_live_stream_state new_state);
 
-#endif /* BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H */
+#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP */
index 926ace11ee35cc6ee7178c71b255c5804a99de86..e4d480f6dfe539e7fb8b92eb0df279cfaa0c63aa 100644 (file)
@@ -6,8 +6,8 @@
  * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  */
 
  * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  */
 
-#ifndef LTTNG_VIEWER_ABI_H
-#define LTTNG_VIEWER_ABI_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_VIEWER_ABI_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_VIEWER_ABI_HPP
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
@@ -359,4 +359,4 @@ struct lttng_viewer_detach_session_response
     uint32_t status;
 } __attribute__((__packed__));
 
     uint32_t status;
 } __attribute__((__packed__));
 
-#endif /* LTTNG_VIEWER_ABI_H */
+#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_VIEWER_ABI_HPP */
index 7c2d7659d023724ee388e603cee1dc7feb78aabf..2a02032c2582cddba48ba7c6475db1710783f538 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef LTTNG_LIVE_METADATA_H
-#define LTTNG_LIVE_METADATA_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_METADATA_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_METADATA_HPP
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
@@ -16,4 +16,4 @@ int lttng_live_metadata_create_stream(struct lttng_live_session *session, uint64
 
 enum lttng_live_iterator_status lttng_live_metadata_update(struct lttng_live_trace *trace);
 
 
 enum lttng_live_iterator_status lttng_live_metadata_update(struct lttng_live_trace *trace);
 
-#endif /* LTTNG_LIVE_METADATA_H */
+#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_METADATA_HPP */
index 0f284581e1de33328f631544906d4c89be823adc..9610a15edcba85d1422bded2507e7f5dce673316 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
  * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef LTTNG_LIVE_VIEWER_CONNECTION_H
-#define LTTNG_LIVE_VIEWER_CONNECTION_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP
 
 #include <string>
 
 
 #include <string>
 
@@ -111,4 +111,4 @@ lttng_live_create_viewer_session(struct lttng_live_msg_iter *lttng_live_msg_iter
 bt2::Value::Shared
 live_viewer_connection_list_sessions(struct live_viewer_connection *viewer_connection);
 
 bt2::Value::Shared
 live_viewer_connection_list_sessions(struct live_viewer_connection *viewer_connection);
 
-#endif /* LTTNG_LIVE_VIEWER_CONNECTION_H */
+#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP */
index cd9b9d61c658625291c4fbcaebed0f2a0eee3bbb..2a64169153c24ec303a81bb70dc31ebce1d120f0 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace - Executable and Shared Object Debug Info Reader
  */
 
  * Babeltrace - Executable and Shared Object Debug Info Reader
  */
 
-#ifndef _BABELTRACE_BIN_INFO_H
-#define _BABELTRACE_BIN_INFO_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_BIN_INFO_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_BIN_INFO_H
 
 #include <babeltrace2/babeltrace.h>
 #include <stdint.h>
 
 #include <babeltrace2/babeltrace.h>
 #include <stdint.h>
@@ -218,4 +218,4 @@ int bin_info_get_bin_loc(struct bin_info *bin, uint64_t addr, char **bin_loc);
  */
 void source_location_destroy(struct source_location *src_loc);
 
  */
 void source_location_destroy(struct source_location *src_loc);
 
-#endif /* _BABELTRACE_BIN_INFO_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_BIN_INFO_H */
index 7e1e254ca992d3c882667b099ca5862cb0705548..5dedda43a53dd14f6acbeeb8f8caeb25a3c4261a 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (c) 1991, 1993 The Regents of the University of California.
  */
 
  * Copyright (c) 1991, 1993 The Regents of the University of California.
  */
 
-#ifndef _BABELTRACE_CRC32_H
-#define _BABELTRACE_CRC32_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_CRC32_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_CRC32_H
 
 #include <stdint.h>
 #include <stdio.h>
 
 #include <stdint.h>
 #include <stdio.h>
@@ -24,4 +24,4 @@
  */
 int crc32(int fd, uint32_t *crc);
 
  */
 int crc32(int fd, uint32_t *crc);
 
-#endif /* _BABELTRACE_CRC32_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_CRC32_H */
index 8a7e8ea0e464cd856380432e3760fcf74b576449..5877a056e15f85feba2dabae981f521888046a87 100644 (file)
@@ -8,8 +8,8 @@
  * Babeltrace - Debug information Plugin
  */
 
  * Babeltrace - Debug information Plugin
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DEBUG_INFO_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DEBUG_INFO_H
 
 #include <stdint.h>
 #include <stdbool.h>
 
 #include <stdint.h>
 #include <stdbool.h>
@@ -55,4 +55,4 @@ bt_message_iterator_class_seek_beginning_method_status debug_info_msg_iter_seek_
 
 void debug_info_msg_iter_finalize(bt_self_message_iterator *it);
 
 
 void debug_info_msg_iter_finalize(bt_self_message_iterator *it);
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DEBUG_INFO_H */
index 2a446b194c22a06af8ae0f3b79f40242ee8ec621..288eb9c23cc02d2a28aeda2ec9265b38c055d9a0 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace - DWARF Information Reader
  */
 
  * Babeltrace - DWARF Information Reader
  */
 
-#ifndef _BABELTRACE_DWARF_H
-#define _BABELTRACE_DWARF_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DWARF_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DWARF_H
 
 #include <stdbool.h>
 #include <stdint.h>
 
 #include <stdbool.h>
 #include <stdint.h>
@@ -201,4 +201,4 @@ int bt_dwarf_die_get_call_line(struct bt_dwarf_die *die,
 int bt_dwarf_die_contains_addr(struct bt_dwarf_die *die, uint64_t addr,
                bool *contains);
 
 int bt_dwarf_die_contains_addr(struct bt_dwarf_die *die, uint64_t addr,
                bool *contains);
 
-#endif /* _BABELTRACE_DWARF_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_DWARF_H */
index 319d366b661248c08d499a96d4c0b8b80993e861..847befa1c13794a6b5e674998c19c8aa17bdb610 100644 (file)
@@ -7,8 +7,8 @@
  * Babeltrace - Trace IR data object copy
  */
 
  * Babeltrace - Trace IR data object copy
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_DATA_COPY_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_DATA_COPY_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_DATA_COPY_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_DATA_COPY_H
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -31,4 +31,4 @@ enum debug_info_trace_ir_mapping_status copy_field_content(
                const bt_field *in_field, bt_field *out_field,
                bt_logging_level log_level, bt_self_component *self_comp);
 
                const bt_field *in_field, bt_field *out_field,
                bt_logging_level log_level, bt_self_component *self_comp);
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_DATA_COPY_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_DATA_COPY_H */
index 37da3bcf73c7136207aeb170b7bfeac647cae9bb..b4d7445bae875534a934d8e2299a5dc0963fe6c3 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com>
  */
 
  * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_MAPPING_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_MAPPING_H
 
 #include <glib.h>
 
 
 #include <glib.h>
 
@@ -261,4 +261,4 @@ struct trace_ir_metadata_maps *borrow_metadata_maps_from_input_event_class(
                        bt_event_class_borrow_stream_class_const(in_event_class));
 }
 
                        bt_event_class_borrow_stream_class_const(in_event_class));
 }
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_MAPPING_H */
index b853ada9f49ab4c266f8cbbd93ca8fb4e6cec536..06c99035ec907b92f06dc8fd3f90556f90e073d4 100644 (file)
@@ -8,8 +8,8 @@
  * Babeltrace - Trace IR metadata object copy
  */
 
  * Babeltrace - Trace IR metadata object copy
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_METADATA_COPY_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_METADATA_COPY_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_COPY_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_COPY_H
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -47,4 +47,4 @@ bt_field_class *create_field_class_copy(
                struct trace_ir_metadata_maps *trace_ir_metadata_maps,
                const bt_field_class *in_field_class);
 
                struct trace_ir_metadata_maps *trace_ir_metadata_maps,
                const bt_field_class *in_field_class);
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_METADATA_COPY_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_COPY_H */
index 65c6ecd702685b482e23bd9ebd1f4ade4ed8f2b4..84802c9da64864cdfbb4f3ded42ccc94c95ad092 100644 (file)
@@ -7,8 +7,8 @@
  * Babeltrace - Trace IR metadata field class copy
  */
 
  * Babeltrace - Trace IR metadata field class copy
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_FIELD_CLASS_COPY_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_FIELD_CLASS_COPY_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_FIELD_CLASS_COPY_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_FIELD_CLASS_COPY_H
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -23,4 +23,4 @@ bt_field_class *create_field_class_copy_internal(
                struct trace_ir_metadata_maps *trace_ir_metadata_maps,
                const bt_field_class *in_field_class);
 
                struct trace_ir_metadata_maps *trace_ir_metadata_maps,
                const bt_field_class *in_field_class);
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_FIELD_CLASS_COPY_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_TRACE_IR_METADATA_FIELD_CLASS_COPY_H */
index 27cf93ec1c575521fcfedee01e8807844f1ba859..4d9310d9f2a636270e7b1aee619e6d450465b5ed 100644 (file)
@@ -6,8 +6,8 @@
  * Babeltrace - Debug Info Utilities
  */
 
  * Babeltrace - Debug Info Utilities
  */
 
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_UTILS_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_UTILS_H
+#ifndef BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_UTILS_H
+#define BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_UTILS_H
 
 #include <stdbool.h>
 
 
 #include <stdbool.h>
 
@@ -25,4 +25,4 @@ bool is_event_common_ctx_dbg_info_compatible(
                const bt_field_class *in_field_class,
                const char *debug_info_field_class_name);
 
                const bt_field_class *in_field_class,
                const char *debug_info_field_class_name);
 
-#endif /* BABELTRACE_PLUGIN_DEBUG_INFO_UTILS_H */
+#endif /* BABELTRACE_PLUGINS_LTTNG_UTILS_DEBUG_INFO_UTILS_H */
index f4cb3dc154c7ddb5a31404b46fe902c17527ac61..e3759318a5a42f2ae0448d60dbb3684db423dbde 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H
-#define BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H
+#ifndef BABELTRACE_PLUGINS_TEXT_DMESG_DMESG_H
+#define BABELTRACE_PLUGINS_TEXT_DMESG_DMESG_H
 
 #include <stdbool.h>
 #include "common/macros.h"
 
 #include <stdbool.h>
 #include "common/macros.h"
@@ -38,4 +38,4 @@ dmesg_msg_iter_can_seek_beginning(
 bt_message_iterator_class_seek_beginning_method_status dmesg_msg_iter_seek_beginning(
                bt_self_message_iterator *message_iterator);
 
 bt_message_iterator_class_seek_beginning_method_status dmesg_msg_iter_seek_beginning(
                bt_self_message_iterator *message_iterator);
 
-#endif /* BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H */
+#endif /* BABELTRACE_PLUGINS_TEXT_DMESG_DMESG_H */
index b73f33455767fb0c93c80631b48c10ad6d40ac10..f19b18c1093fd72f751b28672ffaef8588a78bd8 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_TEXT_PRETTY_PRETTY_H
-#define BABELTRACE_PLUGIN_TEXT_PRETTY_PRETTY_H
+#ifndef BABELTRACE_PLUGINS_TEXT_PRETTY_PRETTY_H
+#define BABELTRACE_PLUGINS_TEXT_PRETTY_PRETTY_H
 
 #include <glib.h>
 #include <stdio.h>
 
 #include <glib.h>
 #include <stdio.h>
@@ -117,4 +117,4 @@ int pretty_print_discarded_items(struct pretty_component *pretty,
 
 void pretty_print_init(void);
 
 
 void pretty_print_init(void);
 
-#endif /* BABELTRACE_PLUGIN_TEXT_PRETTY_PRETTY_H */
+#endif /* BABELTRACE_PLUGINS_TEXT_PRETTY_PRETTY_H */
index ad886bb3bfdea3c36af9885f9ab68b3d7585cb17..302d699329ef9e25fdc0571152992228c9e8bc56 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGINS_UTILS_COUNTER_H
-#define BABELTRACE_PLUGINS_UTILS_COUNTER_H
+#ifndef BABELTRACE_PLUGINS_UTILS_COUNTER_COUNTER_H
+#define BABELTRACE_PLUGINS_UTILS_COUNTER_COUNTER_H
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
@@ -54,4 +54,4 @@ bt_component_class_sink_consume_method_status counter_consume(bt_self_component_
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_H */
+#endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_COUNTER_H */
index 0a7c6a95f037cede02e5675a25c2ee78cff7c464..29e4e7cd4eafbee33a65c223fa750e4d29a825d6 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGINS_UTILS_DUMMY_H
-#define BABELTRACE_PLUGINS_UTILS_DUMMY_H
+#ifndef BABELTRACE_PLUGINS_UTILS_DUMMY_DUMMY_H
+#define BABELTRACE_PLUGINS_UTILS_DUMMY_DUMMY_H
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
 
 #include <glib.h>
 #include <babeltrace2/babeltrace.h>
@@ -36,4 +36,4 @@ bt_component_class_sink_consume_method_status dummy_consume(
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_PLUGINS_UTILS_DUMMY_H */
+#endif /* BABELTRACE_PLUGINS_UTILS_DUMMY_DUMMY_H */
index 4d89da390f051e1c7293ed02b83b48f015af3b3a..ff24cb3609828471a8d73942d764343d67ca37df 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * SPDX-License-Identifier: MIT
  *
 /*
  * SPDX-License-Identifier: MIT
  *
index 0cb997a430e047d06facee3102dd4a927c7b414d..d61374f87dcbd708fc63f2fa8080d53fc07ff3d5 100644 (file)
@@ -6,8 +6,8 @@
  * BabelTrace - Trace Trimmer Plug-in
  */
 
  * BabelTrace - Trace Trimmer Plug-in
  */
 
-#ifndef BABELTRACE_PLUGINS_UTILS_TRIMMER_H
-#define BABELTRACE_PLUGINS_UTILS_TRIMMER_H
+#ifndef BABELTRACE_PLUGINS_UTILS_TRIMMER_TRIMMER_H
+#define BABELTRACE_PLUGINS_UTILS_TRIMMER_TRIMMER_H
 
 #include "common/macros.h"
 #include <babeltrace2/babeltrace.h>
 
 #include "common/macros.h"
 #include <babeltrace2/babeltrace.h>
@@ -39,4 +39,4 @@ void trimmer_msg_iter_finalize(bt_self_message_iterator *self_msg_iter);
 }
 #endif
 
 }
 #endif
 
-#endif /* BABELTRACE_PLUGINS_UTILS_TRIMMER_H */
+#endif /* BABELTRACE_PLUGINS_UTILS_TRIMMER_TRIMMER_H */
index 7d4e3f14d4687d079553baa10d5f46a59cb8b9d3..6ba19590be59baddbaf479178a5ae69e0dc942cc 100644 (file)
@@ -6,8 +6,8 @@
  * Copyright (c) 2019 Simon Marchi <simon.marchi@efficios.com>
  */
 
  * Copyright (c) 2019 Simon Marchi <simon.marchi@efficios.com>
  */
 
-#ifndef BABELTRACE_PY_COMMON_INTERNAL_H
-#define BABELTRACE_PY_COMMON_INTERNAL_H
+#ifndef BABELTRACE_PY_COMMON_PY_COMMON_H
+#define BABELTRACE_PY_COMMON_PY_COMMON_H
 
 #include <glib.h>
 #include <Python.h>
 
 #include <glib.h>
 #include <Python.h>
@@ -46,4 +46,4 @@ GString *bt_py_common_format_exception(PyObject *py_exc_type,
  */
 GString *bt_py_common_format_current_exception(int log_level);
 
  */
 GString *bt_py_common_format_current_exception(int log_level);
 
-#endif /* BABELTRACE_PY_COMMON_INTERNAL_H */
+#endif /* BABELTRACE_PY_COMMON_PY_COMMON_H */
index 74694714cde33ae302e0b6238f4d22ef56906a17..3393cba2fc762d67fc1b1548ede88d19b4199d99 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_PYTHON_PLUGIN_PROVIDER_INTERNAL_H
-#define BABELTRACE_PLUGIN_PYTHON_PLUGIN_PROVIDER_INTERNAL_H
+#ifndef BABELTRACE_PYTHON_PLUGIN_PROVIDER_PYTHON_PLUGIN_PROVIDER_H
+#define BABELTRACE_PYTHON_PLUGIN_PROVIDER_PYTHON_PLUGIN_PROVIDER_H
 
 #include <babeltrace2/babeltrace.h>
 #include <stdbool.h>
 
 #include <babeltrace2/babeltrace.h>
 #include <stdbool.h>
@@ -15,4 +15,4 @@ int bt_plugin_python_create_all_from_file(const char *path,
                bool fail_on_load_error,
                struct bt_plugin_set **plugin_set_out);
 
                bool fail_on_load_error,
                struct bt_plugin_set **plugin_set_out);
 
-#endif /* BABELTRACE_PLUGIN_PYTHON_PLUGIN_PROVIDER_INTERNAL_H */
+#endif /* BABELTRACE_PYTHON_PLUGIN_PROVIDER_PYTHON_PLUGIN_PROVIDER_H */
index 25da4648d34490bcbada7403c70753c41d2eb05f..799c397fd598f1a92d9e170e808ef7ba7826f8a0 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2019 EfficiOS, Inc.
  */
 
  * Copyright (C) 2019 EfficiOS, Inc.
  */
 
-#ifndef _BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H
-#define _BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H
+#ifndef BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H
+#define BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H
 
 #include <babeltrace2/babeltrace.h>
 #include <common/common.h>
 
 #include <babeltrace2/babeltrace.h>
 #include <common/common.h>
@@ -24,4 +24,4 @@ gchar *format_bt_error(
                bt_logging_level log_level,
                enum bt_common_color_when use_colors);
 
                bt_logging_level log_level,
                enum bt_common_color_when use_colors);
 
-#endif /* _BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H */
+#endif /* BABELTRACE_STRING_FORMAT_FORMAT_ERROR_H */
index 25050042615f54b9cc355f05e2a2cb6052cb1386..3508da33bd72ac48cf19f4f97dbccf9d3b605b9d 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2019 EfficiOS, Inc.
  */
 
  * Copyright (C) 2019 EfficiOS, Inc.
  */
 
-#ifndef _BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H
-#define _BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H
+#ifndef BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H
+#define BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H
 
 #include <babeltrace2/babeltrace.h>
 #include <common/common.h>
 
 #include <babeltrace2/babeltrace.h>
 #include <common/common.h>
@@ -16,4 +16,4 @@ gchar *format_plugin_comp_cls_opt(const char *plugin_name,
                const char *comp_cls_name, bt_component_class_type type,
                enum bt_common_color_when use_colors);
 
                const char *comp_cls_name, bt_component_class_type type,
                enum bt_common_color_when use_colors);
 
-#endif /* _BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H */
+#endif /* BABELTRACE_STRING_FORMAT_FORMAT_PLUGIN_COMP_CLS_NAME_H */
index 173ffeb039b0a06a69457d5e902988aa3ba5677e..ada3bbf167d2413051c0032aa82d6f77a12df1c6 100644 (file)
@@ -6,11 +6,11 @@
  * Debug Info - Tests
  */
 
  * Debug Info - Tests
  */
 
-#ifndef _LIBHELLO_H
-#define _LIBHELLO_H
+#ifndef BABELTRACE_TESTS_DATA_PLUGINS_FLT_LTTNG_UTILS_DEBUG_INFO_LIBHELLO_H
+#define BABELTRACE_TESTS_DATA_PLUGINS_FLT_LTTNG_UTILS_DEBUG_INFO_LIBHELLO_H
 
 void foo();
 void bar();
 void baz();
 
 
 void foo();
 void bar();
 void baz();
 
-#endif  /* _LIBHELLO_H */
+#endif /* BABELTRACE_TESTS_DATA_PLUGINS_FLT_LTTNG_UTILS_DEBUG_INFO_LIBHELLO_H */
index aa7e68768390aaa4b4e1fb0692fbbbe6ed2b4de2..5f5cbed032ea6e59371761cfe657c18d00844cc0 100644 (file)
@@ -31,8 +31,8 @@ public:
                                  const MsgType msgType2,
                                  const CreateClockCls createClockCls2) noexcept :
         _mMsgType1 {msgType1},
                                  const MsgType msgType2,
                                  const CreateClockCls createClockCls2) noexcept :
         _mMsgType1 {msgType1},
-        _mMsgType2 {msgType2}, _mCreateClockCls1 {createClockCls1}, _mCreateClockCls2 {
-                                                                        createClockCls2}
+        _mMsgType2 {msgType2}, _mCreateClockCls1 {createClockCls1},
+        _mCreateClockCls2 {createClockCls2}
     {
     }
 
     {
     }
 
index cabf25cf6287b63542d75349fd2905d675e0feb0..7f28e20fca48a08e6cd02e4549ae51a43adf8941 100644 (file)
@@ -4,11 +4,11 @@
  * Copyright (C) 2024 EfficiOS Inc.
  */
 
  * Copyright (C) 2024 EfficiOS Inc.
  */
 
-#ifndef TESTS_LIB_CONDS_CLK_CLS_COMPAT_POSTCONDS_TRIGGERS_HPP
-#define TESTS_LIB_CONDS_CLK_CLS_COMPAT_POSTCONDS_TRIGGERS_HPP
+#ifndef BABELTRACE_TESTS_LIB_CONDS_CLK_CLS_COMPAT_POSTCONDS_TRIGGERS_HPP
+#define BABELTRACE_TESTS_LIB_CONDS_CLK_CLS_COMPAT_POSTCONDS_TRIGGERS_HPP
 
 #include "utils.hpp"
 
 void addClkClsCompatTriggers(CondTriggers& triggers);
 
 
 #include "utils.hpp"
 
 void addClkClsCompatTriggers(CondTriggers& triggers);
 
-#endif
+#endif /* BABELTRACE_TESTS_LIB_CONDS_CLK_CLS_COMPAT_POSTCONDS_TRIGGERS_HPP */
index 2ea53bc4e8d7739f488df13decac8f8d8f514986..7833c072ce86805ceeacd9aa04c00992512246c4 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
  * Copyright (C) 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef TESTS_LIB_CONDS_UTILS_HPP
-#define TESTS_LIB_CONDS_UTILS_HPP
+#ifndef BABELTRACE_TESTS_LIB_CONDS_UTILS_HPP
+#define BABELTRACE_TESTS_LIB_CONDS_UTILS_HPP
 
 #include <functional>
 #include <memory>
 
 #include <functional>
 #include <memory>
@@ -180,4 +180,4 @@ using CondTriggers = std::vector<CondTrigger::UP>;
  */
 void condMain(const bt2s::span<const char * const> argv, const CondTriggers& triggers) noexcept;
 
  */
 void condMain(const bt2s::span<const char * const> argv, const CondTriggers& triggers) noexcept;
 
-#endif /* TESTS_LIB_CONDS_UTILS_HPP */
+#endif /* BABELTRACE_TESTS_LIB_CONDS_UTILS_HPP */
index 54e8ec20c3204401990e36f8e57ffa87b89b6a3b..62770b5dee44122c013eabbf346ae512511c6eee 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright (C) 2020-2023 EfficiOS, inc.
  */
 
  * Copyright (C) 2020-2023 EfficiOS, inc.
  */
 
-#ifndef TESTS_LIB_UTILS_RUN_IN_HPP
-#define TESTS_LIB_UTILS_RUN_IN_HPP
+#ifndef BABELTRACE_TESTS_LIB_UTILS_RUN_IN_HPP
+#define BABELTRACE_TESTS_LIB_UTILS_RUN_IN_HPP
 
 #include <babeltrace2/babeltrace.h>
 
 
 #include <babeltrace2/babeltrace.h>
 
@@ -52,4 +52,4 @@ public:
  */
 void runIn(RunIn& runIn);
 
  */
 void runIn(RunIn& runIn);
 
-#endif /* TESTS_LIB_UTILS_RUN_IN_HPP */
+#endif /* BABELTRACE_TESTS_LIB_UTILS_RUN_IN_HPP */
index ef05d1d590d518f37598ab4a8b088a0a0bcac0ad..60bbd763bd85fb7a272bcacc3b19a557661c473f 100644 (file)
@@ -156,8 +156,8 @@ public:
     ErrorTestCase(CreateClockClass createClockClass1Param, CreateClockClass createClockClass2Param,
                   const char * const testName, const char * const expectedCauseMsg) :
         _mCreateClockClass1 {createClockClass1Param},
     ErrorTestCase(CreateClockClass createClockClass1Param, CreateClockClass createClockClass2Param,
                   const char * const testName, const char * const expectedCauseMsg) :
         _mCreateClockClass1 {createClockClass1Param},
-        _mCreateClockClass2 {createClockClass2Param}, _mTestName {testName}, _mExpectedCauseMsg {
-                                                                                 expectedCauseMsg}
+        _mCreateClockClass2 {createClockClass2Param}, _mTestName {testName},
+        _mExpectedCauseMsg {expectedCauseMsg}
     {
     }
 
     {
     }
 
index df035d36509f6551ac6179fdbe9bc091fb353410..7c73aa2b9bc776ff58bea91c42edc3e5c3844214 100755 (executable)
@@ -21,13 +21,27 @@ data_dir=$BT_TESTS_DATADIR/plugins/src.ctf.fs/field
 test_pass() {
     local -r mp_path=$1
     local -r output_dir=$(mktemp -d)
 test_pass() {
     local -r mp_path=$1
     local -r output_dir=$(mktemp -d)
+    local -r py_cmd=(
+        "$BT_TESTS_PYTHON_BIN" "$data_dir/data_from_mp.py"
+        "$mp_path" "$output_dir"
+    )
 
 
-    run_python "$BT_TESTS_PYTHON_BIN" "$data_dir/data_from_mp.py" "$mp_path" "$output_dir"
+    if ! bt_run_in_py_env "${py_cmd[@]}"; then
+        fail "Failed to run \`${py_cmd[*]}\`"
+        return 1
+    fi
 
     local -r res_path=$(mktemp)
 
     local -r res_path=$(mktemp)
-
-    bt_cli "$res_path" /dev/null --plugin-path="$data_dir" \
+    local -r cli_cmd=(
+        "$res_path" /dev/null --plugin-path="$data_dir"
         -c sink.test-text.single "$output_dir/trace"
         -c sink.test-text.single "$output_dir/trace"
+    )
+
+    if ! bt_cli "${cli_cmd[@]}"; then
+        fail "Failed to run \`bt_cli ${cli_cmd[*]}\`"
+        return 1
+    fi
+
     bt_diff "$res_path" "$output_dir/expect"
     ok $? "$mp_path"
     rm -rf "$output_dir" "$res_path"
     bt_diff "$res_path" "$output_dir/expect"
     ok $? "$mp_path"
     rm -rf "$output_dir" "$res_path"
index cbd96cf14624d6d7686edb0f238d64c22528d177..1831d5de3b5ee20234eb9f8425d210f102d4746d 100644 (file)
@@ -7,9 +7,9 @@
  * Lib BabelTrace - Common function to all tests
  */
 
  * Lib BabelTrace - Common function to all tests
  */
 
-#ifndef TESTS_UTILS_COMMON_H
-#define TESTS_UTILS_COMMON_H
+#ifndef BABELTRACE_TESTS_UTILS_COMMON_H
+#define BABELTRACE_TESTS_UTILS_COMMON_H
 
 void recursive_rmdir(const char *path);
 
 
 void recursive_rmdir(const char *path);
 
-#endif /* TESTS_UTILS_COMMON_H */
+#endif /* BABELTRACE_TESTS_UTILS_COMMON_H */
index 692def5d7656d58e7b68e39b99481b038dbdf401..f3d4d94572482114443dd0f21dbbbb67bf78d18e 100644 (file)
@@ -239,6 +239,16 @@ bt_diff() {
        local -r expected_file=$1
        local -r actual_file=$2
 
        local -r expected_file=$1
        local -r actual_file=$2
 
+       if [[ ! -e $expected_file ]]; then
+               echo "ERROR: expected file \`$expected_file\` doesn't exist" >&2
+               return 1
+       fi
+
+       if [[ ! -e $actual_file ]]; then
+               echo "ERROR: actual file \`$actual_file\` doesn't exist" >&2
+               return 1
+       fi
+
        diff -u <(bt_remove_cr_inline "$expected_file") <(bt_remove_cr_inline "$actual_file") 1>&2
 }
 
        diff -u <(bt_remove_cr_inline "$expected_file") <(bt_remove_cr_inline "$actual_file") 1>&2
 }
 
diff --git a/tools/check-include-guard.py b/tools/check-include-guard.py
new file mode 100755 (executable)
index 0000000..c4fc92c
--- /dev/null
@@ -0,0 +1,111 @@
+#!/usr/bin/env python3
+
+# Usage: check-include-guard.py [--fix] FILE
+#
+# Checks (and optionally tries to fix) the C/C++ header include guard
+# names and format of `FILE`.
+#
+# With `--fix`, this script fixes the include guard names in place.
+
+import re
+import sys
+import pathlib
+import argparse
+
+
+class _Oops(Exception):
+    def __init__(self, msg: str):
+        self._msg = msg
+
+    @property
+    def msg(self):
+        return self._msg
+
+
+def _make_expected_ig_name(filename: pathlib.Path):
+    # Normalize `filename` (e.g. remove `..`) and make it relative to
+    # the root of the source tree.
+    root = pathlib.Path(__file__).parent.parent.resolve(strict=True)
+    filename = filename.absolute().resolve(strict=True).relative_to(root)
+
+    expected_ig_name = re.sub(r"[/.-]", "_", str(filename)).upper()
+    expected_ig_name = re.sub(r"^SRC_", "", expected_ig_name)
+    return "BABELTRACE_" + expected_ig_name
+
+
+def _check_file(filename: pathlib.Path, fix: bool):
+    with open(filename) as f:
+        contents = f.read()
+
+    write_file = False
+
+    # Top part
+    top_re = re.compile(r"^(/\*.+?\*/)\n\n#ifndef (\w+)\n#define (\w+)\n", re.DOTALL)
+    top_m = top_re.match(contents)
+
+    if not top_m:
+        raise _Oops(
+            "Top of the file doesn't have the expected form: block comment, empty line, and then two include guard lines"
+        )
+
+    expected_ig_name = _make_expected_ig_name(filename)
+
+    if fix:
+        contents = top_re.sub(
+            rf"\1\n\n#ifndef {expected_ig_name}\n#define {expected_ig_name}\n",
+            contents,
+        )
+        write_file = True
+    else:
+        if top_m.group(2) != expected_ig_name:
+            raise _Oops(
+                f"In `#ifndef {top_m.group(2)}` include guard line: expecting `#ifndef {expected_ig_name}`"
+            )
+
+        if top_m.group(3) != expected_ig_name:
+            raise _Oops(
+                f"In `#define {top_m.group(3)}` include guard line: expecting `#define {expected_ig_name}`"
+            )
+
+    # Bottom part
+    bottom_re = re.compile(r"\n\n#endif(?: /\* (\w+) \*/)?\n$")
+    bottom_m = bottom_re.search(contents)
+
+    if not bottom_m:
+        raise _Oops("Missing final `#endif` include guard line and trailing empty line")
+
+    if fix:
+        contents = bottom_re.sub(f"\n\n#endif /* {expected_ig_name} */\n", contents)
+        write_file = True
+    else:
+        if bottom_m.group(1) != expected_ig_name:
+            raise _Oops(
+                f"In bottom `#endif` include guard line: expecting `#endif /* {expected_ig_name} */`"
+            )
+
+    if write_file:
+        with open(filename, "w") as f:
+            f.write(contents)
+
+
+def _main():
+    argparser = argparse.ArgumentParser()
+    argparser.add_argument(
+        "-f",
+        "--fix",
+        action="store_true",
+        help="attempt to fix the include guards of FILE",
+    )
+    argparser.add_argument("FILE")
+    args = argparser.parse_args()
+    filename = pathlib.Path(args.FILE)
+
+    try:
+        _check_file(filename, args.fix)
+    except _Oops as exc:
+        print(f"{filename}: {exc}", file=sys.stderr)
+        sys.exit(1)
+
+
+if __name__ == "__main__":
+    _main()
diff --git a/tools/check-include-guards.sh b/tools/check-include-guards.sh
new file mode 100755 (executable)
index 0000000..89a3dd9
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2024 EfficiOS Inc.
+
+# Change directory to the root of the project, to make `find` simpler
+cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
+
+find src tests \
+       \( -name '*.hpp' -or -name '*.h' \) \
+       ! -path '/.git/*' \
+       ! -path 'src/argpar/*' \
+       ! -path 'src/cpp-common/vendor/*' \
+       ! -path 'tests/data/plugins/flt.lttng-utils.debug-info/tp.h' \
+       ! -path 'tests/utils/tap/tap.h' \
+       -print0 | xargs -P "$(nproc)" -n1 -t -0 tools/check-include-guard.py "$@"
index c0a9583a163cce8c513379938485a5e542407dc8..763c726beee51418359143ef8dbbae152c655ac4 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Copyright (C) 2020-2023 Philippe Proulx <pproulx@efficios.com>
 
 #
 # Copyright (C) 2020-2023 Philippe Proulx <pproulx@efficios.com>
 
-expected_formatter_major_version=15
+expected_formatter_major_version=16
 
 # Runs the formatter, returning 1 if it's not the expected version.
 #
 
 # Runs the formatter, returning 1 if it's not the expected version.
 #
This page took 0.143981 seconds and 4 git commands to generate.