(Merge 3.3) Parser/asdl_c.py: use Py_CLEAR()

This commit is contained in:
Victor Stinner 2013-07-27 00:04:42 +02:00
commit b318990cac
2 changed files with 134 additions and 268 deletions

View File

@ -535,8 +535,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