Commit 911cc28e authored by Stefan Behnel's avatar Stefan Behnel

Move assertion where it actually belongs, since it does not apply to the...

Move assertion where it actually belongs, since it does not apply to the buffer cleanup case (which semantically jumps over it with a 'goto').
parent 6dbd2209
......@@ -2077,11 +2077,11 @@ class FuncDefNode(StatNode, BlockNode):
elif gil_owned['error']:
code.put_release_ensured_gil()
gil_owned['error'] = False
assert gil_owned['error'] == gil_owned['success'], "%s: error path %s != success path %s" % (
self.pos, gil_owned['error'], gil_owned['success'])
# ----- Non-error return cleanup
code.put_label(code.return_label)
assert gil_owned['error'] == gil_owned['success'], "%s: error path %s != success path %s" % (
self.pos, gil_owned['error'], gil_owned['success'])
for entry in used_buffer_entries:
assure_gil('success')
......
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