[3.12] gh-105390: Add explicit type cast (GH-105466) (#105472)

This commit is contained in:
Miss Islington (bot) 2023-06-07 15:46:24 -07:00 committed by GitHub
parent 1e128779be
commit 3d4a786b9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";