Commit efdf3160 authored by gsamain's avatar gsamain

Avoid unlocking never-locked objects at the end of functions

parent 3086df3a
...@@ -2187,6 +2187,7 @@ class FuncDefNode(StatNode, BlockNode): ...@@ -2187,6 +2187,7 @@ class FuncDefNode(StatNode, BlockNode):
code.put_cyxdecref(entry.cname) code.put_cyxdecref(entry.cname)
for node in lenv.autolocked_nodes: for node in lenv.autolocked_nodes:
if node.entry.needs_rlock or node.entry.needs_wlock:
code.putln("Cy_UNLOCK(%s);" % node.result()) code.putln("Cy_UNLOCK(%s);" % node.result())
# Decref any increfed args # Decref any increfed args
......
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