projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change required clang-format version to 14
[babeltrace.git]
/
src
/
common
/
macros.h
diff --git
a/src/common/macros.h
b/src/common/macros.h
index 718a3050ccb1b4b96b9a00cf84adeb35185bdae0..34ac393f76bda366a8ad142ff4d568ba3465bb25 100644
(file)
--- a/
src/common/macros.h
+++ b/
src/common/macros.h
@@
-7,6
+7,16
@@
#ifndef _BABELTRACE_INTERNAL_H
#define _BABELTRACE_INTERNAL_H
#ifndef _BABELTRACE_INTERNAL_H
#define _BABELTRACE_INTERNAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+#define BT_EXTERN_C extern "C"
+#else
+#define BT_EXTERN_C
+#endif
+
#define bt_max_t(type, a, b) \
((type) (a) > (type) (b) ? (type) (a) : (type) (b))
#define bt_max_t(type, a, b) \
((type) (a) > (type) (b) ? (type) (a) : (type) (b))
@@
-39,7
+49,7
@@
#define BT_MOVE_REF(ref) \
({ \
#define BT_MOVE_REF(ref) \
({ \
-
typeof(ref) _ref = ref;
\
+
__typeof__(ref) _ref = ref;
\
ref = NULL; \
_ref; \
})
ref = NULL; \
_ref; \
})
@@
-71,4
+81,8
@@
((void) sizeof((void) (_expr1), (void) (_expr2), \
(void) (_expr3), (void) (_expr4), (void) (_expr5), 0))
((void) sizeof((void) (_expr1), (void) (_expr2), \
(void) (_expr3), (void) (_expr4), (void) (_expr5), 0))
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
This page took
0.022926 seconds
and
4
git commands to generate.