summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-02 00:59:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-02 00:59:49 +0900
commit873fae9f4505a5f2b5146f969917e8b083269f36 (patch)
treea030934381aebcdc91d76a24f3e789209447f976
parent7721463a35b753184db7c190babbddaf6ba14daa (diff)
downloadmruby-873fae9f4505a5f2b5146f969917e8b083269f36.tar.gz
mruby-873fae9f4505a5f2b5146f969917e8b083269f36.zip
wrap function prototype by extern "C"
-rw-r--r--tools/mrbc/mrbc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c
index bc6886f1e..e5858e54a 100644
--- a/tools/mrbc/mrbc.c
+++ b/tools/mrbc/mrbc.c
@@ -9,8 +9,15 @@
#define RITEBIN_EXT ".mrb"
#define C_EXT ".c"
+#if defined(__cplusplus)
+extern "C" {
void mrb_show_version(mrb_state *);
void mrb_show_copyright(mrb_state *);
+}
+#else
+void mrb_show_version(mrb_state *);
+void mrb_show_copyright(mrb_state *);
+#endif
struct mrbc_args {
int argc;