diff options
| author | KOBAYASHI Shuji <[email protected]> | 2021-01-11 09:21:07 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2021-01-11 09:21:07 +0900 |
| commit | 90b53f4c29dd845140175943263b9c67995324c4 (patch) | |
| tree | acc4aa53b32ccffab96c1747f41081fc482ba61a /src/dump.c | |
| parent | 3deb3a7aac0136d08a20a31c5d44f6b9a3fe751f (diff) | |
| download | mruby-90b53f4c29dd845140175943263b9c67995324c4.tar.gz mruby-90b53f4c29dd845140175943263b9c67995324c4.zip | |
Avoid including `presym.inc` in existing header files
Addressed an issue where existing programs linking `libmruby.a` could only
be built by adding `<build-dir>/include` to compiler's include path.
Diffstat (limited to 'src/dump.c')
| -rw-r--r-- | src/dump.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dump.c b/src/dump.c index 79908b47f..45900cecd 100644 --- a/src/dump.c +++ b/src/dump.c @@ -1222,7 +1222,10 @@ mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE if (fp == NULL || initname == NULL || initname[0] == '\0') { return MRB_DUMP_INVALID_ARGUMENT; } - if (fprintf(fp, "#include <mruby.h>\n" "#include <mruby/proc.h>\n\n") < 0) { + if (fprintf(fp, "#include <mruby.h>\n" + "#include <mruby/proc.h>\n" + "#include <mruby/presym.h>\n" + "\n") < 0) { return MRB_DUMP_WRITE_FAULT; } fputs("#define mrb_BRACED(...) {__VA_ARGS__}\n", fp); |
