Improved algorithm of renaming of methods with numbers at the end.

Fixed some const issues.
Improved report on overloaded function error.
Fixed some minor iterator potential problems.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-04 13:12:31 +00:00
commit 4cd98d3865
13 changed files with 96 additions and 26 deletions

View file

@ -114,3 +114,11 @@ SWIG_STD_VECTOR_SPECIALIZE(MyClass, MyClass *)
};
}
#endif
#if defined(SWIGRUBY)
%template(LanguageVector) std::vector< swig::LANGUAGE_OBJ >;
%inline {
std::vector< swig::LANGUAGE_OBJ > LanguageVector;
}
#endif

View file

@ -34,7 +34,7 @@ C_TEST_CASES += \
include $(srcdir)/../common.mk
# Overridden variables here
SWIGOPT += -noautorename -features autodoc=4
SWIGOPT += -w801 -noautorename -features autodoc=4
# Rules for the different types of tests

View file

@ -90,7 +90,9 @@ dv.kind_of? DoubleVector
halved = []
halved = dv.map { |x| x / 2 }
halve_in_place(dv)
halved == dv.to_a
p halved.to_a
p dv.to_a
halved.to_a == dv.to_a
sv = StructVector.new
sv << Li_std_vector::Struct.new
sv[0].class == Li_std_vector::Struct
@ -98,3 +100,18 @@ sv[1] = Li_std_vector::Struct.new
EOF
swig_assert_each_line(<<'EOF', binding)
lv = LanguageVector.new
lv << 1
lv << [1,2]
lv << 'asd'
lv[0], lv[1] = lv[1], lv[0]
EOF
# this should assert
begin
lv = LanguageVector.new('crapola')
rescue
end