mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)
This commit is contained in:
parent
3af2dc7588
commit
a4056c8f9c
4 changed files with 37 additions and 0 deletions
|
@ -601,6 +601,7 @@ class Obj2ModVisitor(PickleVisitor):
|
|||
args = [f.name for f in prod.fields]
|
||||
args.extend([a.name for a in prod.attributes])
|
||||
self.emit("*out = %s(%s);" % (ast_func_name(name), self.buildArgs(args)), 1)
|
||||
self.emit("if (*out == NULL) goto failed;", 1)
|
||||
self.emit("return 0;", 1)
|
||||
self.emit("failed:", 0)
|
||||
self.emit("Py_XDECREF(tmp);", 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue