Use `nint()` for implicit cast; ref #5260

parent 7e116b5e
...@@ -4247,7 +4247,7 @@ peekc_n(parser_state *p, int n) ...@@ -4247,7 +4247,7 @@ peekc_n(parser_state *p, int n)
list = push(list, nint(c0)); list = push(list, nint(c0));
} while(n--); } while(n--);
if (p->pb) { if (p->pb) {
p->pb = append((node*)list, p->pb); p->pb = append(list, p->pb);
} }
else { else {
p->pb = list; p->pb = list;
...@@ -4770,7 +4770,7 @@ parse_string(parser_state *p) ...@@ -4770,7 +4770,7 @@ parse_string(parser_state *p)
node *nd = new_str(p, tok(p), toklen(p)); node *nd = new_str(p, tok(p), toklen(p));
pylval.nd = nd; pylval.nd = nd;
if (unindent && head) { 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); heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, empty && line_head);
} }
return tHD_STRING_MID; return tHD_STRING_MID;
...@@ -4805,8 +4805,8 @@ parse_string(parser_state *p) ...@@ -4805,8 +4805,8 @@ parse_string(parser_state *p)
p->lineno++; p->lineno++;
p->column = 0; p->column = 0;
if (unindent) { if (unindent) {
nspaces = push(nspaces, (node*)spaces); nspaces = push(nspaces, nint(spaces));
escaped = push(escaped, (node*)pos); escaped = push(escaped, nint(pos));
pos--; pos--;
empty = TRUE; empty = TRUE;
spaces = 0; spaces = 0;
...@@ -4864,7 +4864,7 @@ parse_string(parser_state *p) ...@@ -4864,7 +4864,7 @@ parse_string(parser_state *p)
pylval.nd = nd; pylval.nd = nd;
if (hinf) { if (hinf) {
if (unindent && head) { if (unindent && head) {
nspaces = push(nspaces, (node*)spaces); nspaces = push(nspaces, nint(spaces));
heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, FALSE); heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, FALSE);
} }
hinf->line_head = FALSE; hinf->line_head = FALSE;
...@@ -5004,7 +5004,7 @@ number_literal_suffix(parser_state *p) ...@@ -5004,7 +5004,7 @@ number_literal_suffix(parser_state *p)
if (!ISASCII(c) || ISALPHA(c) || c == '_') { if (!ISASCII(c) || ISALPHA(c) || c == '_') {
p->column = column; p->column = column;
if (p->pb) { if (p->pb) {
p->pb = append((node*)list, p->pb); p->pb = append(list, p->pb);
} }
else { else {
p->pb = list; p->pb = list;
......
This diff is collapsed.
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