Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-105390: Add explicit type cast (GH-105466)
(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
commit 9826fac4dd70184fab62a32f1dded6fbda8b3b46
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