summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-06-20 17:35:03 (GMT)
committerGitHub <noreply@github.com>2020-06-20 17:35:03 (GMT)
commitc9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3 (patch)
tree4886ecf234c548e21517efefb34a52c06174124d /Parser
parent75238869b546526ac9e18d6169f3dc87c7f94eef (diff)
downloadcpython-c9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3.zip
cpython-c9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3.tar.gz
cpython-c9f83c173b0cc62d6fcdc363e9ab05f6664ff8f3.tar.bz2
bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)
(cherry picked from commit 861efc6e8fe7f030b1e193989b13287b31385939) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pegen/pegen.c2
-rw-r--r--Parser/pegen/pegen.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c
index e63e5a8..a1a59ae 100644
--- a/Parser/pegen/pegen.c
+++ b/Parser/pegen/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/pegen.h b/Parser/pegen/pegen.h
index e459fc5..1c038ab 100644
--- a/Parser/pegen/pegen.h
+++ b/Parser/pegen/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;