mirror of https://github.com/python/cpython
Parser/asdl_c.py: use Py_CLEAR()
This commit is contained in:
parent
ce72e1ce6c
commit
1acc129d48
|
@ -526,8 +526,7 @@ class Obj2ModVisitor(PickleVisitor):
|
||||||
(field.type, field.name), depth+1)
|
(field.type, field.name), depth+1)
|
||||||
self.emit("if (res != 0) goto failed;", depth+1)
|
self.emit("if (res != 0) goto failed;", depth+1)
|
||||||
|
|
||||||
self.emit("Py_XDECREF(tmp);", depth+1)
|
self.emit("Py_CLEAR(tmp);", depth+1)
|
||||||
self.emit("tmp = NULL;", depth+1)
|
|
||||||
self.emit("} else {", depth)
|
self.emit("} else {", depth)
|
||||||
if not field.opt:
|
if not field.opt:
|
||||||
message = "required field \\\"%s\\\" missing from %s" % (field.name, name)
|
message = "required field \\\"%s\\\" missing from %s" % (field.name, name)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue