]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Sat, 20 Jun 2020 12:57:27 +0000 (15:57 +0300)
committerGitHub <noreply@github.com>
Sat, 20 Jun 2020 12:57:27 +0000 (05:57 -0700)
Parser/pegen.c
Parser/pegen.h

index b374740308a363017cd0468ad65a1bec881dac90..594754cee5d5380d38e3ae0a59f7b0fdd21bb206 100644 (file)
@@ -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) {
index 43168074c35000c944838ee045ab9274e13b2964..ef095dda49fd71198cf006417a54b4507bcfd34c 100644 (file)
@@ -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;