summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-07 11:49:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-01-07 11:49:50 +0900
commitec6f46c05dfdf5bd7ef5c9a36ea1751ff564b2ef (patch)
tree4395248a084118f916918fcbf9ce5b1dac446d61 /mrbgems/mruby-compiler/core/parse.y
parent7e116b5e8b6a471cdbc42fc72a9fc5fa7bd9e1c9 (diff)
downloadmruby-ec6f46c05dfdf5bd7ef5c9a36ea1751ff564b2ef.tar.gz
mruby-ec6f46c05dfdf5bd7ef5c9a36ea1751ff564b2ef.zip
Use `nint()` for implicit cast; ref #5260
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 4f2e30931..c5d40375c 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -4247,7 +4247,7 @@ peekc_n(parser_state *p, int n)
list = push(list, nint(c0));
} while(n--);
if (p->pb) {
- p->pb = append((node*)list, p->pb);
+ p->pb = append(list, p->pb);
}
else {
p->pb = list;
@@ -4770,7 +4770,7 @@ parse_string(parser_state *p)
node *nd = new_str(p, tok(p), toklen(p));
pylval.nd = nd;
if (unindent && head) {
- nspaces = push(nspaces, (node*)spaces);
+ nspaces = push(nspaces, nint(spaces));
heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, empty && line_head);
}
return tHD_STRING_MID;
@@ -4805,8 +4805,8 @@ parse_string(parser_state *p)
p->lineno++;
p->column = 0;
if (unindent) {
- nspaces = push(nspaces, (node*)spaces);
- escaped = push(escaped, (node*)pos);
+ nspaces = push(nspaces, nint(spaces));
+ escaped = push(escaped, nint(pos));
pos--;
empty = TRUE;
spaces = 0;
@@ -4864,7 +4864,7 @@ parse_string(parser_state *p)
pylval.nd = nd;
if (hinf) {
if (unindent && head) {
- nspaces = push(nspaces, (node*)spaces);
+ nspaces = push(nspaces, nint(spaces));
heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, FALSE);
}
hinf->line_head = FALSE;
@@ -5004,7 +5004,7 @@ number_literal_suffix(parser_state *p)
if (!ISASCII(c) || ISALPHA(c) || c == '_') {
p->column = column;
if (p->pb) {
- p->pb = append((node*)list, p->pb);
+ p->pb = append(list, p->pb);
}
else {
p->pb = list;