summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Parser/parsetok.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index b4957b8..629dee5 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;