summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2023-06-07 20:20:43 (GMT)
committerGitHub <noreply@github.com>2023-06-07 20:20:43 (GMT)
commit264a0110ffa4e08b0c7b1023e67a6bd7cb9617c6 (patch)
treeacb4d07409e642425b53162206209db9bb9a8c51 /Python
parent5394bf92aa6516feb3322d8372d1579bd9c1417b (diff)
downloadcpython-264a0110ffa4e08b0c7b1023e67a6bd7cb9617c6.zip
cpython-264a0110ffa4e08b0c7b1023e67a6bd7cb9617c6.tar.gz
cpython-264a0110ffa4e08b0c7b1023e67a6bd7cb9617c6.tar.bz2
gh-105390: Add explicit type cast (#105466)
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-tokenize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c
index 83a129c..2cf052a 100644
--- a/Python/Python-tokenize.c
+++ b/Python/Python-tokenize.c
@@ -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";