projects
/
deliverable
/
barectf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3783ae
)
barectf.h: add __cplusplus check
author
Philippe Proulx
<eeppeliteloop@gmail.com>
Wed, 9 Nov 2016 17:29:06 +0000
(12:29 -0500)
committer
Philippe Proulx
<eeppeliteloop@gmail.com>
Wed, 9 Nov 2016 17:34:08 +0000
(12:34 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/templates.py
patch
|
blob
|
blame
|
history
diff --git
a/barectf/templates.py
b/barectf/templates.py
index fcc90ef724e3e2573a56b8de97f73594658d6136..bf00f27aa1016dea6b6268be64acb84f37b32a7f 100644
(file)
--- a/
barectf/templates.py
+++ b/
barectf/templates.py
@@
-263,6
+263,10
@@
_HEADER_BEGIN = '''#ifndef _{ucprefix}H
#include "{bitfield_header_filename}"
+#ifdef __cplusplus
+extern "C" {{
+#endif
+
{prefix_def}
{default_stream_def}
@@
-280,7
+284,12
@@
uint32_t {prefix}packet_buf_size(void *ctx);
int {prefix}packet_is_open(void *ctx);'''
-_HEADER_END = '#endif /* _{ucprefix}H */'
+_HEADER_END = '''#ifdef __cplusplus
+}}
+#endif
+
+#endif /* _{ucprefix}H */
+'''
_C_SRC = '''/*
This page took
0.023332 seconds
and
4
git commands to generate.