Fix a compiler warning on Windows 64-bit in parsetok.c

Python parser doesn't support lines longer than INT_MAX bytes yet
This commit is contained in:
Victor Stinner 2013-11-18 01:09:51 +01:00
parent 3a8a333942
commit cad876d542
1 changed files with 2 additions and 1 deletions

View File

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