[Python-checkins] Fix Windows compiler warning in tokenize.c (GH-8359)
Victor Stinner
webhook-mailer at python.org
Fri Jul 20 21:36:09 EDT 2018
https://github.com/python/cpython/commit/c884616390f990a58fe337376904530a48a0e833
commit: c884616390f990a58fe337376904530a48a0e833
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-07-21T03:36:06+02:00
summary:
Fix Windows compiler warning in tokenize.c (GH-8359)
Fix the following warning on Windows:
parser\tokenizer.c(1297): warning C4244: 'function': conversion from
'__int64' to 'int', possible loss of data.
files:
M Parser/tokenizer.c
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index f8b83c9f3d7f..6566fdead380 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1294,7 +1294,7 @@ syntaxerror(struct tok_state *tok, const char *format, ...)
va_end(vargs);
PyErr_SyntaxLocationObject(tok->filename,
tok->lineno,
- tok->cur - tok->line_start);
+ (int)(tok->cur - tok->line_start));
tok->done = E_ERROR;
#else
tok->done = E_TOKEN;
More information about the Python-checkins
mailing list