[Python-checkins] cpython: Fix a compiler warning on Windows 64-bit in parsetok.c
victor.stinner
python-checkins at python.org
Mon Nov 18 01:10:20 CET 2013
http://hg.python.org/cpython/rev/19e900e3033f
changeset: 87230:19e900e3033f
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Nov 18 01:09:51 2013 +0100
summary:
Fix a compiler warning on Windows 64-bit in parsetok.c
Python parser doesn't support lines longer than INT_MAX bytes yet
files:
Parser/parsetok.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -254,7 +254,8 @@
}
#endif
if (a >= tok->line_start)
- col_offset = a - tok->line_start;
+ col_offset = Py_SAFE_DOWNCAST(a - tok->line_start,
+ Py_intptr_t, int);
else
col_offset = -1;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list