src/common/{common,safe}.h: wrap code in C++ guards
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 11 Dec 2020 00:19:35 +0000 (19:19 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 31 Aug 2021 18:55:52 +0000 (14:55 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ifcb907d159b67e6f27a5191553824fe2ed25ef5d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4534
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/common/common.h
src/common/safe.h

index a04f2be64cd4747939c9254b7c26c340b1dfdb4d..c8b9bb8b163b10629b6c781e154affce3f32a301 100644 (file)
 #include "common/macros.h"
 #include "common/safe.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BT_COMMON_COLOR_RESET                  "\033[0m"
 #define BT_COMMON_COLOR_BOLD                   "\033[1m"
 #define BT_COMMON_COLOR_FG_DEFAULT             "\033[39m"
@@ -849,4 +853,8 @@ void bt_common_g_string_append_c(GString *str, char c)
        str->str[len + 1] = '\0';
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* BABELTRACE_COMMON_INTERNAL_H */
index 6999730c9730a87f297a0ecb51bc538a0add15df..cb962c48065805fb9db5dbd5ce7daa9c6892bc30 100644 (file)
@@ -7,6 +7,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static inline
 bool bt_safe_to_mul_int64(int64_t a, int64_t b)
 {
@@ -38,3 +42,7 @@ bool bt_safe_to_add_uint64(uint64_t a, uint64_t b)
 {
        return a <= UINT64_MAX - b;
 }
+
+#ifdef __cplusplus
+}
+#endif
This page took 0.025768 seconds and 4 git commands to generate.