summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-26 22:04:42 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-26 22:04:42 (GMT)
commitb318990cacb02b6f59f0b529cb3e6014f4b1c9fd (patch)
tree187e7820eaea9a3ffe2f71f058933c95b66458cd /Parser
parentee4b59c0f8d60161380284b897e7f650a1abb638 (diff)
parent1acc129d48121cc7ce5860e6825f14bdb8ea6d09 (diff)
downloadcpython-b318990cacb02b6f59f0b529cb3e6014f4b1c9fd.zip
cpython-b318990cacb02b6f59f0b529cb3e6014f4b1c9fd.tar.gz
cpython-b318990cacb02b6f59f0b529cb3e6014f4b1c9fd.tar.bz2
(Merge 3.3) Parser/asdl_c.py: use Py_CLEAR()
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 498531d..7d586b2 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -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)