From 298fd2df3977cc2cb40a33a28542c5c29ac8d108 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 21 Jan 2006 00:02:05 +0000 Subject: [PATCH] remove vc++ noise git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8497 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/default_constructor.i | 6 ++++++ SWIG/Examples/test-suite/li_std_wstring.i | 8 ++++++++ SWIG/Examples/test-suite/python/li_std_wstring.i | 8 ++++++++ SWIG/Examples/test-suite/python/std_containers.i | 3 +++ SWIG/Examples/test-suite/using_pointers.i | 6 ++++++ 5 files changed, 31 insertions(+) diff --git a/SWIG/Examples/test-suite/default_constructor.i b/SWIG/Examples/test-suite/default_constructor.i index 8a591db4b..9d6237120 100644 --- a/SWIG/Examples/test-suite/default_constructor.i +++ b/SWIG/Examples/test-suite/default_constructor.i @@ -96,8 +96,14 @@ public: void bar(F *) { } +#if defined(_MSC_VER) + #pragma warning(disable: 4624) // : destructor could not be generated because a base class destructor is inaccessible +#endif class FFF : public F { }; +#if defined(_MSC_VER) + #pragma warning(default: 4624) // : destructor could not be generated because a base class destructor is inaccessible +#endif /* A class with a protected destructor */ class G { diff --git a/SWIG/Examples/test-suite/li_std_wstring.i b/SWIG/Examples/test-suite/li_std_wstring.i index 906b62b25..51fac7f34 100644 --- a/SWIG/Examples/test-suite/li_std_wstring.i +++ b/SWIG/Examples/test-suite/li_std_wstring.i @@ -64,12 +64,20 @@ std::wstring& test_reference_out() { return x; } +#if defined(_MSC_VER) + #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + void test_throw() throw(std::wstring){ static std::wstring x = L"x"; throw x; } +#if defined(_MSC_VER) + #pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + %} diff --git a/SWIG/Examples/test-suite/python/li_std_wstring.i b/SWIG/Examples/test-suite/python/li_std_wstring.i index c5cd20576..c809e11ec 100644 --- a/SWIG/Examples/test-suite/python/li_std_wstring.i +++ b/SWIG/Examples/test-suite/python/li_std_wstring.i @@ -70,12 +70,20 @@ std::wstring& test_reference_out() { return x; } +#if defined(_MSC_VER) + #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + void test_throw() throw(std::wstring){ static std::wstring x = L"x"; throw x; } +#if defined(_MSC_VER) + #pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + %} diff --git a/SWIG/Examples/test-suite/python/std_containers.i b/SWIG/Examples/test-suite/python/std_containers.i index a6b5206ac..a1d39e7ab 100644 --- a/SWIG/Examples/test-suite/python/std_containers.i +++ b/SWIG/Examples/test-suite/python/std_containers.i @@ -1,5 +1,8 @@ %module std_containers +%{ +#include +%} %include std_vector.i %include std_string.i %include std_deque.i diff --git a/SWIG/Examples/test-suite/using_pointers.i b/SWIG/Examples/test-suite/using_pointers.i index 372057c1a..b2d6abe4d 100644 --- a/SWIG/Examples/test-suite/using_pointers.i +++ b/SWIG/Examples/test-suite/using_pointers.i @@ -4,6 +4,12 @@ %csmethodmodifiers x "public new" #endif +%{ +#if defined(_MSC_VER) + #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif +%} + %inline %{ class Foo { public: