diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-07 15:46:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 23:46:24 +0100 |
commit | 3d4a786b9b6382efa0dbe6f28d34b26426bb4165 (patch) | |
tree | cf6142e240e3c6a192c4902cea0f563688b7fec6 /Python | |
parent | [3.12] gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-10... (diff) | |
download | cpython-3d4a786b9b6382efa0dbe6f28d34b26426bb4165.tar.gz cpython-3d4a786b9b6382efa0dbe6f28d34b26426bb4165.tar.bz2 cpython-3d4a786b9b6382efa0dbe6f28d34b26426bb4165.zip |
[3.12] gh-105390: Add explicit type cast (GH-105466) (#105472)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/Python-tokenize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 83a129c138b..2cf052a0cde 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"; |