summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-10-18 06:58:08 +0900
committerGitHub <[email protected]>2019-10-18 06:58:08 +0900
commite5f7b1d26270909df34aa153b5a68989174aa4f9 (patch)
tree0caa09c1567b89d04c2407001bb5fb7173bb7bba /src/dump.c
parentbc4799361e171cc91c4f944604ce2e950043e09c (diff)
parentd29178a9cd4c73541a041b04e98a81bbca68c862 (diff)
downloadmruby-e5f7b1d26270909df34aa153b5a68989174aa4f9.tar.gz
mruby-e5f7b1d26270909df34aa153b5a68989174aa4f9.zip
Merge pull request #4777 from yurie/pr
Remove constant export declaration for MRBC output compiled as C
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dump.c b/src/dump.c
index 5972c166d..183f3b67d 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -943,7 +943,9 @@ mrb_dump_irep_cfunc(mrb_state *mrb, mrb_irep *irep, uint8_t flags, FILE *fp, con
return MRB_DUMP_WRITE_FAULT;
}
if (fprintf(fp,
+ "#ifdef __cplusplus\n"
"extern const uint8_t %s[];\n"
+ "#endif\n"
"const uint8_t\n"
"#if defined __GNUC__\n"
"__attribute__((aligned(%u)))\n"