Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now corrected to std::vector< ::X::Y >.
This commit is contained in:
parent
625a405b8e
commit
6b4e57245d
33 changed files with 339 additions and 303 deletions
|
|
@ -71,11 +71,11 @@ namespace std {
|
|||
%traits_swigtype(_Tp);
|
||||
%traits_enum(_Tp);
|
||||
|
||||
%fragment(SWIG_Traits_frag(std::vector<_Tp, _Alloc >), "header",
|
||||
%fragment(SWIG_Traits_frag(std::vector< _Tp, _Alloc >), "header",
|
||||
fragment=SWIG_Traits_frag(_Tp),
|
||||
fragment="StdVectorTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits<std::vector<_Tp, _Alloc > > {
|
||||
template <> struct traits<std::vector< _Tp, _Alloc > > {
|
||||
typedef pointer_category category;
|
||||
static const char* type_name() {
|
||||
return "std::vector<" #_Tp "," #_Alloc " >";
|
||||
|
|
@ -84,11 +84,11 @@ namespace std {
|
|||
}
|
||||
}
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp, _Alloc >);
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp, _Alloc >);
|
||||
|
||||
#ifdef %swig_vector_methods
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods(std::vector<_Tp, _Alloc >);
|
||||
%swig_vector_methods(std::vector< _Tp, _Alloc >);
|
||||
#endif
|
||||
|
||||
%std_vector_methods(vector);
|
||||
|
|
@ -99,7 +99,7 @@ namespace std {
|
|||
// a 'const SWIGTYPE*&' can be defined
|
||||
// ***
|
||||
template<class _Tp, class _Alloc >
|
||||
class vector<_Tp*, _Alloc > {
|
||||
class vector< _Tp*, _Alloc > {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
|
|
@ -112,11 +112,11 @@ namespace std {
|
|||
|
||||
%traits_swigtype(_Tp);
|
||||
|
||||
%fragment(SWIG_Traits_frag(std::vector<_Tp*, _Alloc >), "header",
|
||||
%fragment(SWIG_Traits_frag(std::vector< _Tp*, _Alloc >), "header",
|
||||
fragment=SWIG_Traits_frag(_Tp),
|
||||
fragment="StdVectorTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits<std::vector<_Tp*, _Alloc > > {
|
||||
template <> struct traits<std::vector< _Tp*, _Alloc > > {
|
||||
typedef value_category category;
|
||||
static const char* type_name() {
|
||||
return "std::vector<" #_Tp " *," #_Alloc " >";
|
||||
|
|
@ -125,11 +125,11 @@ namespace std {
|
|||
}
|
||||
}
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp*, _Alloc >);
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp*, _Alloc >);
|
||||
|
||||
#ifdef %swig_vector_methods_val
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods_val(std::vector<_Tp*, _Alloc >);
|
||||
%swig_vector_methods_val(std::vector< _Tp*, _Alloc >);
|
||||
#endif
|
||||
|
||||
%std_vector_methods_val(vector);
|
||||
|
|
@ -139,7 +139,7 @@ namespace std {
|
|||
// const pointer specialization
|
||||
// ***
|
||||
template<class _Tp, class _Alloc >
|
||||
class vector<_Tp const *, _Alloc > {
|
||||
class vector< _Tp const *, _Alloc > {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
|
|
@ -152,11 +152,11 @@ namespace std {
|
|||
|
||||
%traits_swigtype(_Tp);
|
||||
|
||||
%fragment(SWIG_Traits_frag(std::vector<_Tp const*, _Alloc >), "header",
|
||||
%fragment(SWIG_Traits_frag(std::vector< _Tp const*, _Alloc >), "header",
|
||||
fragment=SWIG_Traits_frag(_Tp),
|
||||
fragment="StdVectorTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits<std::vector<_Tp const*, _Alloc > > {
|
||||
template <> struct traits<std::vector< _Tp const*, _Alloc > > {
|
||||
typedef value_category category;
|
||||
static const char* type_name() {
|
||||
return "std::vector<" #_Tp " const*," #_Alloc " >";
|
||||
|
|
@ -165,11 +165,11 @@ namespace std {
|
|||
}
|
||||
}
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp const*, _Alloc >);
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector< _Tp const*, _Alloc >);
|
||||
|
||||
#ifdef %swig_vector_methods_val
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods_val(std::vector<_Tp const*, _Alloc >);
|
||||
%swig_vector_methods_val(std::vector< _Tp const*, _Alloc >);
|
||||
#endif
|
||||
|
||||
%std_vector_methods_val(vector);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue