mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
(Merge 3.3) Parser/asdl_c.py: use Py_CLEAR()
This commit is contained in:
commit
b318990cac
2 changed files with 134 additions and 268 deletions
|
|
@ -535,8 +535,7 @@ class Obj2ModVisitor(PickleVisitor):
|
|||
(field.type, field.name), depth+1)
|
||||
self.emit("if (res != 0) goto failed;", depth+1)
|
||||
|
||||
self.emit("Py_XDECREF(tmp);", depth+1)
|
||||
self.emit("tmp = NULL;", depth+1)
|
||||
self.emit("Py_CLEAR(tmp);", depth+1)
|
||||
self.emit("} else {", depth)
|
||||
if not field.opt:
|
||||
message = "required field \\\"%s\\\" missing from %s" % (field.name, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue