From: Lysandros Nikolaou Date: Sat, 20 Jun 2020 12:57:27 +0000 (+0300) Subject: bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) X-Git-Tag: v3.10.0a1~575 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=861efc6e8fe7f030b1e193989b13287b31385939;p=thirdparty%2FPython%2Fcpython.git bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) --- diff --git a/Parser/pegen.c b/Parser/pegen.c index b374740308a3..594754cee5d5 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 43168074c350..ef095dda49fd 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;