Commit 5b0adffa authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make del unlock autolocked objects

parent 4188bc54
......@@ -6350,6 +6350,8 @@ class DelStatNode(StatNode):
arg.generate_disposal_code(code)
elif arg.type.is_cyp_class:
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("%s = NULL;" % arg.result())
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