Commit fcff9749 authored by Ian Henriksen's avatar Ian Henriksen

Handle C++ exceptions when a call to an overloaded operator[] is

used as an lvalue.
parent 613c070f
...@@ -3605,6 +3605,10 @@ class IndexNode(_IndexingBaseNode): ...@@ -3605,6 +3605,10 @@ class IndexNode(_IndexingBaseNode):
elif self.base.type is bytearray_type: elif self.base.type is bytearray_type:
value_code = self._check_byte_value(code, rhs) value_code = self._check_byte_value(code, rhs)
self.generate_setitem_code(value_code, code) self.generate_setitem_code(value_code, code)
elif self.base.type.is_cpp_class and self.exception_check:
translate_cpp_exception(code, self.pos,
"%s = %s;" % (self.result(), rhs.result()),
self.exception_value, self.in_nogil_context)
else: else:
code.putln( code.putln(
"%s = %s;" % (self.result(), rhs.result())) "%s = %s;" % (self.result(), rhs.result()))
......
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