summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
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)