diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-25 18:27:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 18:27:36 (GMT) |
commit | 87d3b9db4ade1aa100ee6f065082cb7e85b8992f (patch) | |
tree | 85d17fff35bc28beb4a7c6e3a82276f2fa3760d5 /Python/ast.c | |
parent | ace018ca47c03ca699603341b12781b5329d2eaa (diff) | |
download | cpython-87d3b9db4ade1aa100ee6f065082cb7e85b8992f.zip cpython-87d3b9db4ade1aa100ee6f065082cb7e85b8992f.tar.gz cpython-87d3b9db4ade1aa100ee6f065082cb7e85b8992f.tar.bz2 |
bpo-39882: Add _Py_FatalErrorFormat() function (GH-19157)
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 9 |
1 files changed, 3 insertions, 6 deletions
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 @@ num_stmts(const node *n) 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 @@ ast_for_decorator(struct compiling *c, const node *n) REQ(n, decorator); REQ(CHILD(n, 0), AT); REQ(CHILD(n, 2), NEWLINE); - + return ast_for_expr(c, CHILD(n, 1)); } |