From: Victor Stinner Date: Mon, 18 Nov 2013 00:09:51 +0000 (+0100) Subject: Fix a compiler warning on Windows 64-bit in parsetok.c X-Git-Tag: v3.4.0b1~212 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cad876d54273e6f3f9cb3ff575da1c45ef5410c6;p=thirdparty%2FPython%2Fcpython.git Fix a compiler warning on Windows 64-bit in parsetok.c Python parser doesn't support lines longer than INT_MAX bytes yet --- diff --git a/Parser/parsetok.c b/Parser/parsetok.c index b4957b851269..629dee565cd9 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;