swig/Lib/c/std_vector.i
Vadim Zeitlin d89a95a48c Use std/std_vector.i instead of a poor copy in c/std_vector.i
At the very least, this gives us a working vector<bool> and allows
"li_std_vector" unit test to pass. It is also just nice to reuse the existing
typemaps instead of having another copy of them.

As C doesn't have UTL, some parts of std_vector.i had to be excluded from it
however.
2016-09-15 01:27:41 +02:00

13 lines
415 B
OpenEdge ABL

// Wrap const and non-const at() methods as set() and get(), this is simpler to use from C and more clear.
%define %swig_vector_methods(Type...)
%extend {
void set(size_type n, const value_type& val) { self->at(n) = val; }
value_type get(size_type n) const { return self->at(n); }
}
%enddef
%define %swig_vector_methods_val(Type...)
%swig_vector_methods(Type...)
%enddef
%include <std/std_vector.i>