bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)

This commit is contained in:
Lysandros Nikolaou 2020-06-20 15:57:27 +03:00 committed by GitHub
parent 344c2a75c1
commit 861efc6e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -397,7 +397,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype,
} }
if (p->start_rule == Py_file_input) { 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) { if (!error_line) {

View File

@ -34,7 +34,7 @@ typedef struct _memo {
typedef struct { typedef struct {
int type; int type;
PyObject *bytes; PyObject *bytes;
Py_ssize_t lineno, col_offset, end_lineno, end_col_offset; int lineno, col_offset, end_lineno, end_col_offset;
Memo *memo; Memo *memo;
} Token; } Token;