fixes for strings and cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5792 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f958140af5
commit
f896efa6dd
11 changed files with 409 additions and 204 deletions
|
|
@ -75,8 +75,25 @@ namespace std {
|
|||
|
||||
%typemap_traits(SWIG_CCode(PAIR), std::pair<T,U >);
|
||||
|
||||
pair();
|
||||
pair(const T& __a, const U& __b);
|
||||
pair(const pair& __p);
|
||||
|
||||
T first;
|
||||
U second;
|
||||
|
||||
%extend
|
||||
{
|
||||
const T& f() {
|
||||
return self->first;
|
||||
}
|
||||
|
||||
%pythoncode {
|
||||
def __repr__(self):
|
||||
return "(%s, %s)" %(str(self.first),str(self.second))
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// ***
|
||||
|
|
@ -104,6 +121,10 @@ namespace std {
|
|||
|
||||
%typemap_traits(SWIG_CCode(PAIR), std::pair<T,U* >);
|
||||
|
||||
pair();
|
||||
pair(const T& __a, U* __b);
|
||||
pair(const pair& __p);
|
||||
|
||||
T first;
|
||||
U* second;
|
||||
};
|
||||
|
|
@ -129,6 +150,10 @@ namespace std {
|
|||
|
||||
%typemap_traits(SWIG_CCode(PAIR), std::pair<T*,U >);
|
||||
|
||||
pair();
|
||||
pair(T* __a, const U& __b);
|
||||
pair(const pair& __p);
|
||||
|
||||
T* first;
|
||||
U second;
|
||||
};
|
||||
|
|
@ -151,6 +176,10 @@ namespace std {
|
|||
|
||||
%typemap_traits(SWIG_CCode(PAIR), std::pair<T*,U* >);
|
||||
|
||||
pair();
|
||||
pair(T* __a, U* __b);
|
||||
pair(const pair& __p);
|
||||
|
||||
T* first;
|
||||
U* second;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue