From ed74f61117aad805f75a00e9d219940ed39901cd Mon Sep 17 00:00:00 2001 From: Eclips4 Date: Wed, 7 Jun 2023 21:06:56 +0300 Subject: [PATCH] add explicit convertion --- Python/Python-tokenize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 83a129c138b174..2cf052a0cdeb3b 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";