[Python-checkins] bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
Łukasz Langa
webhook-mailer at python.org
Mon Apr 30 17:51:05 EDT 2018
https://github.com/python/cpython/commit/fb7e7992beec7f76cc2db77ab6ce1e86446bfccf
commit: fb7e7992beec7f76cc2db77ab6ce1e86446bfccf
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: Łukasz Langa <lukasz at langa.pl>
date: 2018-04-30T14:51:02-07:00
summary:
bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
ast.c: fstring_fix_node_location() downcasts a pointer difference to
a C int. Replace int with Py_ssize_t to fix the compiler warning.
files:
M Python/ast.c
diff --git a/Python/ast.c b/Python/ast.c
index e2092f0f8543..0d692ffd95bd 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str)
break;
start--;
}
- cols += substr - start;
+ cols += (int)(substr - start);
/* Fix lineno in mulitline strings. */
while ((substr = strchr(substr + 1, '\n')))
lines--;
More information about the Python-checkins
mailing list