Skip to content

Commit

Permalink
pythongh-105390: Add explicit type cast (pythonGH-105466)
Browse files Browse the repository at this point in the history
(cherry picked from commit 264a011)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
  • Loading branch information
Eclips4 authored and miss-islington committed Jun 7, 2023
1 parent 1e12877 commit 9826fac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/Python-tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ _tokenizer_error(struct tok_state *tok)
break;
case E_EOF:
PyErr_SetString(PyExc_SyntaxError, "unexpected EOF in multi-line statement");
PyErr_SyntaxLocationObject(tok->filename, tok->lineno, tok->inp - tok->buf < 0 ? 0 : tok->inp - tok->buf);
PyErr_SyntaxLocationObject(tok->filename, tok->lineno,
tok->inp - tok->buf < 0 ? 0 : (int)(tok->inp - tok->buf));
return -1;
case E_DEDENT:
msg = "unindent does not match any outer indentation level";
Expand Down

0 comments on commit 9826fac

Please sign in to comment.