diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-26 22:03:47 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-26 22:03:47 (GMT) |
commit | 1acc129d48121cc7ce5860e6825f14bdb8ea6d09 (patch) | |
tree | a4b09e5066ea985d801744a04e2d184e270cf3e7 /Parser | |
parent | ce72e1ce6c7175ba7262e6348e64b05253a71e1a (diff) | |
download | cpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.zip cpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.tar.gz cpython-1acc129d48121cc7ce5860e6825f14bdb8ea6d09.tar.bz2 |
Parser/asdl_c.py: use Py_CLEAR()
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 3 |
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) |