diff --git a/Parser/pegen.c b/Parser/pegen.c index b374740308a..594754cee5d 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -397,7 +397,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, } if (p->start_rule == Py_file_input) { - error_line = PyErr_ProgramTextObject(p->tok->filename, lineno); + error_line = PyErr_ProgramTextObject(p->tok->filename, (int) lineno); } if (!error_line) { diff --git a/Parser/pegen.h b/Parser/pegen.h index 43168074c35..ef095dda49f 100644 --- a/Parser/pegen.h +++ b/Parser/pegen.h @@ -34,7 +34,7 @@ typedef struct _memo { typedef struct { int type; PyObject *bytes; - Py_ssize_t lineno, col_offset, end_lineno, end_col_offset; + int lineno, col_offset, end_lineno, end_col_offset; Memo *memo; } Token;