add guards for swig/language extra methods and comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6386 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3e0de3c3d9
commit
024efdb6f6
12 changed files with 85 additions and 14 deletions
|
|
@ -87,18 +87,13 @@ namespace std {
|
|||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<T >);
|
||||
|
||||
%std_vector_methods(vector);
|
||||
|
||||
#ifdef %swig_vector_methods
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods(std::vector<T >);
|
||||
#endif
|
||||
};
|
||||
|
||||
// bool specialization
|
||||
%extend vector<bool> {
|
||||
void flip()
|
||||
{
|
||||
self->flip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ***
|
||||
// This specialization should dissapear or get simplified when
|
||||
// a 'const SWIGTYPE*&' can be defined
|
||||
|
|
@ -131,11 +126,23 @@ namespace std {
|
|||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<T* >);
|
||||
|
||||
%std_vector_methods_val(vector);
|
||||
|
||||
#ifdef %swig_vector_methods_val
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods_val(std::vector<T* >);
|
||||
#endif
|
||||
};
|
||||
|
||||
// ***
|
||||
// ***
|
||||
// bool specialization
|
||||
%extend vector<bool> {
|
||||
void flip()
|
||||
{
|
||||
self->flip();
|
||||
}
|
||||
}
|
||||
|
||||
template<class T > class vector<bool> {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
|
|
@ -164,7 +171,11 @@ namespace std {
|
|||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<bool>);
|
||||
|
||||
%std_vector_methods_val(vector<bool>);
|
||||
|
||||
#ifdef %swig_vector_methods_val
|
||||
// Add swig/language extra methods
|
||||
%swig_vector_methods_val(std::vector<bool>);
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue