Commit d80b5db9 authored by gsamain's avatar gsamain

Make del unlock autolocked objects

parent 4a907615
...@@ -6133,6 +6133,8 @@ class DelStatNode(StatNode): ...@@ -6133,6 +6133,8 @@ class DelStatNode(StatNode):
arg.generate_disposal_code(code) arg.generate_disposal_code(code)
elif arg.type.is_cyp_class: elif arg.type.is_cyp_class:
arg.generate_evaluation_code(code) arg.generate_evaluation_code(code)
if arg.type.lock_mode == "autolock":
code.putln("Cy_UNLOCK(%s);" % arg.result())
code.putln("Cy_DECREF(%s);" % arg.result()) code.putln("Cy_DECREF(%s);" % arg.result())
code.putln("%s = NULL;" % arg.result()) code.putln("%s = NULL;" % arg.result())
arg.generate_disposal_code(code) arg.generate_disposal_code(code)
......
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