summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTomasz Dąbrowski <[email protected]>2016-11-22 13:19:53 +0100
committerYukihiro "Matz" Matsumoto <[email protected]>2016-11-24 09:28:00 +0900
commit18757c8f7be05d9bc8d850180ada4d3fa1fc018d (patch)
tree25d55e0fc64d5fbf847a042fe3cb75a036550976 /include
parent00e61212600c53e9c4f1629a6e3bcb93422417c2 (diff)
downloadmruby-18757c8f7be05d9bc8d850180ada4d3fa1fc018d.tar.gz
mruby-18757c8f7be05d9bc8d850180ada4d3fa1fc018d.zip
Different method of compiling C as C++ (-x c++)
Diffstat (limited to 'include')
-rw-r--r--include/mruby/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mruby/common.h b/include/mruby/common.h
index 3745c58ea..338044c2f 100644
--- a/include/mruby/common.h
+++ b/include/mruby/common.h
@@ -9,8 +9,13 @@
#ifdef __cplusplus
+#ifdef MRB_ENABLE_CXX_EXCEPTION
+#define MRB_BEGIN_DECL
+#define MRB_END_DECL
+#else
# define MRB_BEGIN_DECL extern "C" {
# define MRB_END_DECL }
+#endif
#else
/** Start declarations in C mode */
# define MRB_BEGIN_DECL