Skip to content

Commit f87182a

Browse files
committed
Improve backwards compatibility in C#/Java std::array wrappers
For users who have typemaps for the parameters in the setitem or set methods.
1 parent 592b97a commit f87182a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Lib/csharp/std_array.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@
192192
else
193193
throw std::out_of_range("index");
194194
}
195-
void setitem(int index, const_reference value) throw (std::out_of_range) {
195+
void setitem(int index, const_reference val) throw (std::out_of_range) {
196196
if (index>=0 && index<(int)$self->size())
197-
(*$self)[index] = value;
197+
(*$self)[index] = val;
198198
else
199199
throw std::out_of_range("index");
200200
}

Lib/java/std_array.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ namespace std {
3131
else
3232
throw std::out_of_range("array index out of range");
3333
}
34-
void set(int i, const value_type& value) throw (std::out_of_range) {
34+
void set(int i, const value_type& val) throw (std::out_of_range) {
3535
int size = int(self->size());
3636
if (i>=0 && i<size)
37-
(*self)[i] = value;
37+
(*self)[i] = val;
3838
else
3939
throw std::out_of_range("array index out of range");
4040
}

0 commit comments

Comments
 (0)