Added constructor that can take functors to all

containers that can use one.
Created file rubystdfunctors.swg to allow passing in
Ruby procs as functors to STL functions (swig-user list
suggestion for Python).
Fixed a bug in type_info() always failing for std::set.
Fixed a bug in type_info() always accepting any failed
conversion which could lead to overloaded functions to
fail when input wrong parameters.




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9775 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-06 03:56:33 +00:00
commit 1cf8fd332b
9 changed files with 186 additions and 14 deletions

View file

@ -114,6 +114,8 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::map<_Key, _Tp, _Compare, _Alloc >);
map( const _Compare&, const _Alloc& a = allocator_type() );
#ifdef %swig_map_methods
// Add swig/language extra methods
%swig_map_methods(std::map<_Key, _Tp, _Compare, _Alloc >);

View file

@ -75,6 +75,8 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_MULTIMAP, std::multimap<_Key, _Tp, _Compare, _Alloc >);
multimap( const _Compare&, const _Alloc& a = allocator_type() );
#ifdef %swig_multimap_methods
// Add swig/language extra methods
%swig_multimap_methods(std::multimap<_Key, _Tp, _Compare, _Alloc >);

View file

@ -71,6 +71,8 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_MULTISET, std::multiset<_Key, _Compare, _Alloc >);
multiset( const _Compare&, const _Alloc& a = allocator_type() );
#ifdef %swig_multiset_methods
// Add swig/language extra methods
%swig_multiset_methods(std::multiset<_Key, _Compare, _Alloc >);

View file

@ -83,7 +83,7 @@ namespace std {
template <> struct traits<std::set<_Key, _Compare, _Alloc > > {
typedef pointer_category category;
static const char* type_name() {
return "std::set<" #_Key "," #_Alloc " >";
return "std::set<" #_Key "," #_Compare "," #_Alloc " >";
}
};
}
@ -91,6 +91,8 @@ namespace std {
%typemap_traits_ptr(SWIG_TYPECHECK_SET, std::set<_Key, _Compare, _Alloc >);
set( const _Compare&, const _Alloc& a = allocator_type() );
#ifdef %swig_set_methods
// Add swig/language extra methods
%swig_set_methods(std::set<_Key, _Compare, _Alloc >);