normalizing the inout typemaps and other cosmetic fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-03-21 23:26:18 +00:00
commit 7afe6bc139
28 changed files with 978 additions and 633 deletions

View file

@ -16,17 +16,6 @@
size_type size() const;
void clear();
%extend {
bool operator == (const container& v) {
return *self == v;
}
bool operator != (const container& v) {
return *self != v;
}
}
void swap(container& v);
#ifdef SWIG_EXPORT_ITERATOR_METHODS
@ -67,10 +56,7 @@
%std_sequence_methods_common(SWIG_arg(sequence));
sequence(size_type size, const value_type& value);
void push_back(const value_type& x);
value_type& front();
value_type& back();
void push_back(const value_type& x);
const value_type& front() const;
const value_type& back() const;
@ -112,7 +98,7 @@
//
%fragment("StdSequenceTraits","header",
fragment="traits",fragment="PyObject_var",
fragment="StdTraits",fragment="PyObject_var",
fragment="PySequence_Cont")
%{
namespace swigpy {
@ -134,7 +120,7 @@
sequence *pseq = new sequence();
assign(pyseq, pseq);
*seq = pseq;
return SWIG_NEWPTR;
return SWIG_NEWOBJ;
} else {
return pyseq.check();
}
@ -189,22 +175,3 @@
}
%}
%define %std_comp_methods(...)
%extend __VA_ARGS__ {
bool operator > (const __VA_ARGS__& v) {
return *self > v;
}
bool operator < (const __VA_ARGS__& v) {
return *self < v;
}
bool operator >= (const __VA_ARGS__& v) {
return *self >= v;
}
bool operator <= (const __VA_ARGS__& v) {
return *self <= v;
}
}
%enddef