From e5f062c9acf8151f0b8a0c8d7e10f0a4b79c6276 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 25 Apr 2018 14:45:09 +0200 Subject: [PATCH] bpo-30465: Fix C downcast warning on Windows in ast.c 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. --- Python/ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/ast.c b/Python/ast.c index e2092f0f85433e..0d692ffd95bd1d 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--;