fixes for latest stl changes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6383 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-10 07:58:03 +00:00
commit ca9e6834df
5 changed files with 13 additions and 13 deletions

View file

@ -148,8 +148,8 @@
// //
%apply const int& { const Hello& }; %apply const int& { const Hello& };
%apply long { pint }; %apply void* { pint };
%apply const long& { const pint& }; %apply const void*& { const pint& };
// //
@ -162,7 +162,7 @@
typedef char namet[5]; typedef char namet[5];
typedef char* pchar; typedef char* pchar;
typedef const char* pcharc; typedef const char* pcharc;
typedef int* pint; typedef char* pint;
char* const def_pchar = (char *const)"hello"; char* const def_pchar = (char *const)"hello";
const char* const def_pcharc = "hija"; const char* const def_pcharc = "hija";

View file

@ -39,6 +39,10 @@
#else #else
%{
%}
%inline %inline
{ {
complex Conj(complex a) complex Conj(complex a)
@ -46,7 +50,8 @@
return conj(a); return conj(a);
} }
float_complex Conjf(float_complex a)
complex float Conjf(float complex a)
{ {
return conj(a); return conj(a);
} }

View file

@ -1,9 +1,8 @@
%module lib_std_map %module lib_std_map
//#define SWIG_STD_EXTEND_COMPARISON
///
%include std_pair.i %include std_pair.i
%include std_map.i %include std_map.i
%include std_multimap.i
%inline %{ %inline %{
struct A{ struct A{
@ -21,6 +20,7 @@ namespace std
%template(pairii) pair<int, int>; %template(pairii) pair<int, int>;
%template(pairA) pair<int, A*>; %template(pairA) pair<int, A*>;
%template(mapA) map<int, A*>; %template(mapA) map<int, A*>;
%template(mmapA) multimap<int, A*>;
%template(paircA1) pair<const int, A*>; %template(paircA1) pair<const int, A*>;
%template(paircA2) pair<const int, const A*>; %template(paircA2) pair<const int, const A*>;

View file

@ -3,7 +3,6 @@
// //
// activate the automatic comparison methods generation (==,!=,...) // activate the automatic comparison methods generation (==,!=,...)
// //
#define SWIG_STD_EXTEND_COMPARISON
%include std_pair.i %include std_pair.i
%include std_string.i %include std_string.i
@ -25,10 +24,11 @@
}; };
%} %}
%std_comp_methods(std::pair<std::string, int>);
namespace std { namespace std {
%template(CIntPair) pair<const int, const int>; %template(CIntPair) pair<const int, const int>;
%template() pair<double, double>; %template() pair<double, double>;
%template(String) basic_string<char>;
%template(IntPair) pair<int, int>; %template(IntPair) pair<int, int>;
%template(SIPair) pair<std::string, int>; %template(SIPair) pair<std::string, int>;
%template(CIPair) pair<std::complex<double>, int>; %template(CIPair) pair<std::complex<double>, int>;

View file

@ -1,10 +1,5 @@
%module std_containers %module std_containers
//
// activate the automatic comparison methods generation (==,!=,...)
//
#define SWIG_STD_EXTEND_COMPARISON
%include std_vector.i %include std_vector.i
%include std_string.i %include std_string.i
%include std_deque.i %include std_deque.i