diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-04-29 01:04:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 01:04:06 (GMT) |
commit | 2208134918ee673451e4fc525bbeab71142d794a (patch) | |
tree | 368a1023ecde4ef638272e8a84e7d54c769995ce | |
parent | 4386b9045e5fe1151e65c2816264b5710000eb9f (diff) | |
download | cpython-2208134918ee673451e4fc525bbeab71142d794a.zip cpython-2208134918ee673451e4fc525bbeab71142d794a.tar.gz cpython-2208134918ee673451e4fc525bbeab71142d794a.tar.bz2 |
bpo-40334: Explicitly cast to int in pegen.c to fix a compiler warning (GH-19779)
-rw-r--r-- | Parser/pegen/pegen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c index 6f78d8c..ef95aac 100644 --- a/Parser/pegen/pegen.c +++ b/Parser/pegen/pegen.c @@ -597,13 +597,13 @@ _PyPegen_fill_token(Parser *p) int lineno = type == STRING ? p->tok->first_lineno : p->tok->lineno; const char *line_start = type == STRING ? p->tok->multi_line_start : p->tok->line_start; - size_t end_lineno = p->tok->lineno; - size_t col_offset = -1, end_col_offset = -1; + int end_lineno = p->tok->lineno; + int col_offset = -1, end_col_offset = -1; if (start != NULL && start >= line_start) { - col_offset = start - line_start; + col_offset = (int)(start - line_start); } if (end != NULL && end >= p->tok->line_start) { - end_col_offset = end - p->tok->line_start; + end_col_offset = (int)(end - p->tok->line_start); } t->lineno = p->starting_lineno + lineno; |