Rename `itoa` to `dump_int` to avoid name crash; ref #4173

parent 16f86f8e
...@@ -221,7 +221,7 @@ parser_strdup(parser_state *p, const char *s) ...@@ -221,7 +221,7 @@ parser_strdup(parser_state *p, const char *s)
#define strdup(s) parser_strdup(p, s) #define strdup(s) parser_strdup(p, s)
static void static void
itoa(short i, char *s) dump_int(short i, char *s)
{ {
char *p = s; char *p = s;
char *t = s; char *t = s;
...@@ -239,6 +239,7 @@ itoa(short i, char *s) ...@@ -239,6 +239,7 @@ itoa(short i, char *s)
*p-- = c; *p-- = c;
} }
} }
/* xxx ----------------------------- */ /* xxx ----------------------------- */
static node* static node*
...@@ -3191,7 +3192,7 @@ var_ref : variable ...@@ -3191,7 +3192,7 @@ var_ref : variable
{ {
char buf[16]; char buf[16];
itoa(p->lineno, buf); dump_int(p->lineno, buf);
$$ = new_int(p, buf, 10); $$ = new_int(p, buf, 10);
} }
| keyword__ENCODING__ | keyword__ENCODING__
...@@ -6144,7 +6145,7 @@ mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c) ...@@ -6144,7 +6145,7 @@ mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c)
char buf[256]; char buf[256];
strcpy(buf, "line "); strcpy(buf, "line ");
itoa(p->error_buffer[0].lineno, buf+5); dump_int(p->error_buffer[0].lineno, buf+5);
strcat(buf, ": "); strcat(buf, ": ");
strcat(buf, p->error_buffer[0].message); strcat(buf, p->error_buffer[0].message);
mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, strlen(buf))); mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, strlen(buf)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment