Improve backwards compatibility in C#/Java std::array wrappers
For users who have typemaps for the parameters in the setitem or set methods.
diff --git a/Lib/csharp/std_array.i b/Lib/csharp/std_array.i
index e7d392b..a4f0f96 100644
--- a/Lib/csharp/std_array.i
+++ b/Lib/csharp/std_array.i
@@ -192,9 +192,9 @@
else
throw std::out_of_range("index");
}
- void setitem(int index, const_reference value) throw (std::out_of_range) {
+ void setitem(int index, const_reference val) throw (std::out_of_range) {
if (index>=0 && index<(int)$self->size())
- (*$self)[index] = value;
+ (*$self)[index] = val;
else
throw std::out_of_range("index");
}
diff --git a/Lib/java/std_array.i b/Lib/java/std_array.i
index f67b18d..d3436cc 100644
--- a/Lib/java/std_array.i
+++ b/Lib/java/std_array.i
@@ -31,10 +31,10 @@
else
throw std::out_of_range("array index out of range");
}
- void set(int i, const value_type& value) throw (std::out_of_range) {
+ void set(int i, const value_type& val) throw (std::out_of_range) {
int size = int(self->size());
if (i>=0 && i<size)
- (*self)[i] = value;
+ (*self)[i] = val;
else
throw std::out_of_range("array index out of range");
}