Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 264a011

Browse files
authored
gh-105390: Add explicit type cast (#105466)
1 parent 5394bf9 commit 264a011

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/Python-tokenize.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ _tokenizer_error(struct tok_state *tok)
8585
break;
8686
case E_EOF:
8787
PyErr_SetString(PyExc_SyntaxError, "unexpected EOF in multi-line statement");
88-
PyErr_SyntaxLocationObject(tok->filename, tok->lineno, tok->inp - tok->buf < 0 ? 0 : tok->inp - tok->buf);
88+
PyErr_SyntaxLocationObject(tok->filename, tok->lineno,
89+
tok->inp - tok->buf < 0 ? 0 : (int)(tok->inp - tok->buf));
8990
return -1;
9091
case E_DEDENT:
9192
msg = "unindent does not match any outer indentation level";

0 commit comments

Comments
 (0)