Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b318990

Browse files
committed
(Merge 3.3) Parser/asdl_c.py: use Py_CLEAR()
2 parents ee4b59c + 1acc129 commit b318990

2 files changed

Lines changed: 134 additions & 268 deletions

File tree

Parser/asdl_c.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,7 @@ def visitField(self, field, name, sum=None, prod=None, depth=0):
535535
(field.type, field.name), depth+1)
536536
self.emit("if (res != 0) goto failed;", depth+1)
537537

538-
self.emit("Py_XDECREF(tmp);", depth+1)
539-
self.emit("tmp = NULL;", depth+1)
538+
self.emit("Py_CLEAR(tmp);", depth+1)
540539
self.emit("} else {", depth)
541540
if not field.opt:
542541
message = "required field \\\"%s\\\" missing from %s" % (field.name, name)

0 commit comments

Comments
 (0)