summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-26 22:03:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-26 22:03:47 (GMT)
commit1acc129d48121cc7ce5860e6825f14bdb8ea6d09 (patch)
treea4b09e5066ea985d801744a04e2d184e270cf3e7 /Parser
parentce72e1ce6c7175ba7262e6348e64b05253a71e1a (diff)
downloadcpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.zip
cpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.tar.gz
cpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.tar.bz2
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 8f0da4a..2568222 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -526,8 +526,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)