Kaydet (Commit) fb7e7992 authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) Łukasz Langa

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.
üst 5a49ca61
...@@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str) ...@@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str)
break; break;
start--; start--;
} }
cols += substr - start; cols += (int)(substr - start);
/* Fix lineno in mulitline strings. */ /* Fix lineno in mulitline strings. */
while ((substr = strchr(substr + 1, '\n'))) while ((substr = strchr(substr + 1, '\n')))
lines--; lines--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment