summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-23 01:52:52 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-23 01:52:52 +0900
commit051e40c0493f2de332f5439e3230c9fe6958bf1a (patch)
tree3f92792b52c6cad5f1b49576bf9f4f7eb9b04f86
parent9eb0c11afd8ca26d08cccd464aef6ef4b4216586 (diff)
downloadmruby-051e40c0493f2de332f5439e3230c9fe6958bf1a.tar.gz
mruby-051e40c0493f2de332f5439e3230c9fe6958bf1a.zip
Use MRB_PRId for NODE_NTH_REF; ref #3530
-rw-r--r--mrbgems/mruby-compiler/core/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 306036275..41984b186 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -3416,7 +3416,7 @@ backref_error(parser_state *p, node *n)
c = (int)(intptr_t)n->car;
if (c == NODE_NTH_REF) {
- yyerror_i(p, "can't set variable $%d", (int)(intptr_t)n->cdr);
+ yyerror_i(p, "can't set variable $%" MRB_PRId, (mrb_int)(intptr_t)n->cdr);
}
else if (c == NODE_BACK_REF) {
yyerror_i(p, "can't set variable $%c", (int)(intptr_t)n->cdr);
@@ -6291,7 +6291,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
break;
case NODE_NTH_REF:
- printf("NODE_NTH_REF: $%d\n", (int)(intptr_t)tree);
+ printf("NODE_NTH_REF: $%" MRB_PRId "\n", (mrb_int)(intptr_t)tree);
break;
case NODE_ARG: