diff options
| author | KOBAYASHI Shuji <[email protected]> | 2020-11-21 21:14:40 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2020-11-21 21:14:40 +0900 |
| commit | 3d056d084aedd2a1a3a36e33b1cef4e90d282813 (patch) | |
| tree | f463c5ac01e1a32a6dea5b6868e2794f6b0479ef /mrbgems/mruby-compiler/core/parse.y | |
| parent | 544784effd251656f7b406bc94880e1ef75af7b5 (diff) | |
| download | mruby-3d056d084aedd2a1a3a36e33b1cef4e90d282813.tar.gz mruby-3d056d084aedd2a1a3a36e33b1cef4e90d282813.zip | |
Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163
| Previous Name | New Name |
|------------------------------|-------------------------|
| MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS |
| MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS |
| MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI |
| MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION |
| MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK |
| MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING |
| MRB_DISABLE_STDIO | MRB_NO_STDIO |
| ENABLE_LINENOISE | MRB_USE_LINENOISE |
| ENABLE_READLINE | MRB_USE_READLINE |
| DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE |
| DISABLE_GEMS | MRB_NO_GEMS |
* `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed.
* `MRB_` prefix is added to those without.
* The previous names can also be used for compatibility.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index d6271f354..ab04e1d6b 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -3984,7 +3984,7 @@ yyerror(parser_state *p, const char *s) size_t n; if (! p->capture_errors) { -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO if (p->filename_sym) { const char *filename = mrb_sym_name_len(p->mrb, p->filename_sym, NULL); fprintf(stderr, "%s:%d:%d: %s\n", filename, p->lineno, p->column, s); @@ -4023,7 +4023,7 @@ yywarn(parser_state *p, const char *s) size_t n; if (! p->capture_errors) { -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO if (p->filename_sym) { const char *filename = mrb_sym_name_len(p->mrb, p->filename_sym, NULL); fprintf(stderr, "%s:%d:%d: warning: %s\n", filename, p->lineno, p->column, s); @@ -4128,7 +4128,7 @@ nextc0(parser_state *p) c = (unsigned char)*p->s++; } else { -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO if (p->f) { c = fgetc(p->f); if (feof(p->f)) return -1; @@ -4232,7 +4232,7 @@ peeks(parser_state *p, const char *s) { size_t len = strlen(s); -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO if (p->f) { int n = 0; while (*s) { @@ -6398,7 +6398,7 @@ mrb_parser_new(mrb_state *mrb) p->pool = pool; p->s = p->send = NULL; -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO p->f = NULL; #endif @@ -6520,7 +6520,7 @@ mrb_parser_get_filename(struct mrb_parser_state* p, uint16_t idx) { } } -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO static struct mrb_parser_state * mrb_parse_file_continue(mrb_state *mrb, FILE *f, const void *prebuf, size_t prebufsize, mrbc_context *c) { @@ -6625,7 +6625,7 @@ mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c) return v; } -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO MRB_API mrb_value mrb_load_file_cxt(mrb_state *mrb, FILE *f, mrbc_context *c) { @@ -6712,7 +6712,7 @@ mrb_load_string(mrb_state *mrb, const char *s) return mrb_load_string_cxt(mrb, s, NULL); } -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO static void dump_prefix(node *tree, int offset) @@ -6802,7 +6802,7 @@ str_dump(mrb_state *mrb, const char *str, int len) void mrb_parser_dump(mrb_state *mrb, node *tree, int offset) { -#ifndef MRB_DISABLE_STDIO +#ifndef MRB_NO_STDIO int nodetype; if (!tree) return; |
