From b55b987adffa822c45b9acaa62b1f80d87062f1c Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 20 Feb 2006 17:09:58 +0000 Subject: [PATCH] fix for ruby,perl and others with no std::vector class git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8852 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/constructor_copy.i | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/SWIG/Examples/test-suite/constructor_copy.i b/SWIG/Examples/test-suite/constructor_copy.i index 83339c5e3..523f911de 100644 --- a/SWIG/Examples/test-suite/constructor_copy.i +++ b/SWIG/Examples/test-suite/constructor_copy.i @@ -68,6 +68,8 @@ public: %template(Bard) Bar; +#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGUTL) + %include "std_vector.i" @@ -75,10 +77,21 @@ public: SWIG_STD_VECTOR_SPECIALIZE_MINIMUM(Flow, Space::Flow) #endif +#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGPYTHON) +#define SWIG_GOOD_VECTOR +%ignore std::vector::vector(size_type); +%ignore std::vector::resize(size_type); +#endif + +#if defined(SWIGTCL) || defined(SWIGPERL) || defined(SWIGRUBY) +#define SWIG_GOOD_VECTOR +/* here, for languages with bad declaration */ +%ignore std::vector::vector(unsigned int); +%ignore std::vector::resize(unsigned int); +#endif + %copyctor; -%ignore std::vector::vector(size_type); -%ignore std::vector::resize(size_type); //Ignore as Flow does not have a default constructor %inline %{ @@ -92,3 +105,7 @@ public: %} %template (VectFlow) std::vector; + +#endif + +