src/common/{common,safe}.h: wrap code in C++ guards
[babeltrace.git] / src / common / safe.h
index 26df90a48f5105e7090e57f776598ab04b9cf08d..cb962c48065805fb9db5dbd5ce7daa9c6892bc30 100644 (file)
@@ -1,7 +1,16 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
 
 #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)
 {
@@ -33,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.024599 seconds and 4 git commands to generate.