]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use Py_ssize_t for the column number in the PEG support code (GH-20341)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 24 May 2020 05:20:44 +0000 (22:20 -0700)
committerGitHub <noreply@github.com>
Sun, 24 May 2020 05:20:44 +0000 (22:20 -0700)
(cherry picked from commit b23d7adfdfa66dd8e6f98e968b1ba885692b67d6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Parser/pegen/pegen.c

index f1e3f9efb2f6b9e18d18d12ef962ae36049aa746..9cade2a476de3ff45cc3338cae8d746460a49cdc 100644 (file)
@@ -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) {