Revert "Use std/std_vector.i instead of a poor copy in c/std_vector.i"

This reverts commit d89a95a48c as,
finally, it's not worth trying to use UTL typemaps from C: this required
bad hacks for std::vector and would be even worse for std::map, so don't
bother with them and just correct the "poor" C typemaps to be slightly
less poor and use them instead.
This commit is contained in:
Vadim Zeitlin 2021-10-07 18:57:15 +02:00
commit 5cbdae42d3
5 changed files with 90 additions and 27 deletions

View file

@ -68,7 +68,6 @@ namespace std {
typedef const value_type& const_reference;
typedef _Alloc allocator_type;
#ifndef SWIGC
%traits_swigtype(_Tp);
%traits_enum(_Tp);
@ -86,7 +85,6 @@ namespace std {
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp, _Alloc >);
#endif // !SWIGC
#ifdef %swig_vector_methods
// Add swig/language extra methods
@ -112,7 +110,6 @@ namespace std {
typedef const value_type& const_reference;
typedef _Alloc allocator_type;
#ifndef SWIGC
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::vector< _Tp*, _Alloc >), "header",
@ -129,7 +126,6 @@ namespace std {
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp*, _Alloc >);
#endif // !SWIGC
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
@ -154,7 +150,6 @@ namespace std {
typedef const value_type& const_reference;
typedef _Alloc allocator_type;
#ifndef SWIGC
%traits_swigtype(_Tp);
%fragment(SWIG_Traits_frag(std::vector< _Tp const*, _Alloc >), "header",
@ -171,7 +166,6 @@ namespace std {
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp const*, _Alloc >);
#endif // !SWIGC
#ifdef %swig_vector_methods_val
// Add swig/language extra methods
@ -197,7 +191,6 @@ namespace std {
typedef bool const_reference;
typedef _Alloc allocator_type;
#ifndef SWIGC
%traits_swigtype(bool);
%fragment(SWIG_Traits_frag(std::vector<bool, _Alloc >), "header",
@ -214,7 +207,7 @@ namespace std {
}
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<bool, _Alloc >);
#endif // !SWIGC
#ifdef %swig_vector_methods_val
// Add swig/language extra methods