From b23d7adfdfa66dd8e6f98e968b1ba885692b67d6 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sun, 24 May 2020 06:01:34 +0100 Subject: [PATCH] Use Py_ssize_t for the column number in the PEG support code (GH-20341) --- Parser/pegen/pegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c index f1e3f9efb2f..9cade2a476d 100644 --- a/Parser/pegen/pegen.c +++ b/Parser/pegen/pegen.c @@ -408,7 +408,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, } } - int col_number = byte_offset_to_character_offset(error_line, col_offset); + Py_ssize_t col_number = byte_offset_to_character_offset(error_line, col_offset); tmp = Py_BuildValue("(OiiN)", p->tok->filename, lineno, col_number, error_line); if (!tmp) {