From cad876d54273e6f3f9cb3ff575da1c45ef5410c6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 18 Nov 2013 01:09:51 +0100 Subject: [PATCH] Fix a compiler warning on Windows 64-bit in parsetok.c Python parser doesn't support lines longer than INT_MAX bytes yet --- Parser/parsetok.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Parser/parsetok.c b/Parser/parsetok.c index b4957b85126..629dee565cd 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -254,7 +254,8 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, } #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;