From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 7 Jun 2023 22:46:24 +0000 (-0700) Subject: [3.12] gh-105390: Add explicit type cast (GH-105466) (#105472) X-Git-Tag: v3.12.0b3~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d4a786b9b6382efa0dbe6f28d34b26426bb4165;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-105390: Add explicit type cast (GH-105466) (#105472) --- diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 83a129c138b1..2cf052a0cdeb 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";