summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-04-10 05:55:40 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-04-10 05:55:40 +0900
commitd529501cbfd2331c530ca37efa7295d9e627af97 (patch)
treeb468941bad68c18ba042a8447642a7d0ce6c47bc
parent16f86f8ede2f0d33fdd642d734c796b9435a57bf (diff)
downloadmruby-d529501cbfd2331c530ca37efa7295d9e627af97.tar.gz
mruby-d529501cbfd2331c530ca37efa7295d9e627af97.zip
Rename `itoa` to `dump_int` to avoid name crash; ref #4173
-rw-r--r--mrbgems/mruby-compiler/core/parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index f6c77859a..cb62ec3f2 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -221,7 +221,7 @@ parser_strdup(parser_state *p, const char *s)
#define strdup(s) parser_strdup(p, s)
static void
-itoa(short i, char *s)
+dump_int(short i, char *s)
{
char *p = s;
char *t = s;
@@ -239,6 +239,7 @@ itoa(short i, char *s)
*p-- = c;
}
}
+
/* xxx ----------------------------- */
static node*
@@ -3191,7 +3192,7 @@ var_ref : variable
{
char buf[16];
- itoa(p->lineno, buf);
+ dump_int(p->lineno, buf);
$$ = new_int(p, buf, 10);
}
| keyword__ENCODING__
@@ -6144,7 +6145,7 @@ mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c)
char buf[256];
strcpy(buf, "line ");
- itoa(p->error_buffer[0].lineno, buf+5);
+ dump_int(p->error_buffer[0].lineno, buf+5);
strcat(buf, ": ");
strcat(buf, p->error_buffer[0].message);
mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, strlen(buf)));