Commit 878a44b0 authored by Victor Stinner's avatar Victor Stinner

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

Python parser doesn't support lines longer than INT_MAX bytes yet
parent 7ffd64eb
...@@ -254,7 +254,8 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, ...@@ -254,7 +254,8 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
} }
#endif #endif
if (a >= tok->line_start) 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 else
col_offset = -1; col_offset = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment