bpo-39882: Add _Py_FatalErrorFormat() function (GH-19157)
diff --git a/Python/ast.c b/Python/ast.c
index 2b74ed4..fb23c02 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -727,11 +727,8 @@
return l;
}
default: {
- char buf[128];
-
- sprintf(buf, "Non-statement found: %d %d",
- TYPE(n), NCH(n));
- Py_FatalError(buf);
+ _Py_FatalErrorFormat(__func__, "Non-statement found: %d %d",
+ TYPE(n), NCH(n));
}
}
Py_UNREACHABLE();
@@ -1664,7 +1661,7 @@
REQ(n, decorator);
REQ(CHILD(n, 0), AT);
REQ(CHILD(n, 2), NEWLINE);
-
+
return ast_for_expr(c, CHILD(n, 1));
}