Commit bc0844d1 authored by Robert Bradshaw's avatar Robert Bradshaw

Decref error in except clause

Temporary variables must be set to zero or they might be XDECREF'ed later, generating very hard to track bugs.
parent 51080d62
...@@ -2589,7 +2589,7 @@ class ExceptClauseNode(Node): ...@@ -2589,7 +2589,7 @@ class ExceptClauseNode(Node):
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
code.exc_vars = old_exc_vars code.exc_vars = old_exc_vars
for var in self.exc_vars: for var in self.exc_vars:
code.putln("Py_DECREF(%s);" % var) code.putln("Py_DECREF(%s); %s = 0;" % (var, var))
code.put_goto(end_label) code.put_goto(end_label)
code.putln( code.putln(
"}") "}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment