]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use Py_ssize_t for the column number in the PEG support code (GH-20341)
authorPablo Galindo <Pablogsal@gmail.com>
Sun, 24 May 2020 05:01:34 +0000 (06:01 +0100)
committerGitHub <noreply@github.com>
Sun, 24 May 2020 05:01:34 +0000 (06:01 +0100)
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) {