Commit 3ef95e06 authored by Xavier Thompson's avatar Xavier Thompson

Revert "Fix cypclass refcount on arrays" to fix temps never being freed

This reverts commit 45d8df5a.
parent a9119337
...@@ -4356,16 +4356,9 @@ class IndexNode(_IndexingBaseNode): ...@@ -4356,16 +4356,9 @@ class IndexNode(_IndexingBaseNode):
code.putln( code.putln(
"%s = %s;" % (self.result(), rhs.result())) "%s = %s;" % (self.result(), rhs.result()))
if self.type.is_cyp_class: self.generate_subexpr_disposal_code(code)
# This hack is due to the fact cypclass objects are ref-counted, so self.free_subexpr_temps(code)
# they goes into temps, but their assignment code is a simple C assignment, rhs.generate_disposal_code(code)
# which doesn't incref the temp.
# So we are effectively absorbing a reference in this case.
rhs.generate_post_assignment_code(code)
else:
self.generate_subexpr_disposal_code(code)
self.free_subexpr_temps(code)
rhs.generate_disposal_code(code)
rhs.free_temps(code) rhs.free_temps(code)
def _check_byte_value(self, code, rhs): def _check_byte_value(self, code, rhs):
......
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