Commit a52c78a0 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make del unlock autolocked objects

parent ccff9bad
...@@ -6380,6 +6380,8 @@ class DelStatNode(StatNode): ...@@ -6380,6 +6380,8 @@ class DelStatNode(StatNode):
arg.free_temps(code) arg.free_temps(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