From 1a5013196d1b951ebf85bd355f532b3aaa15278d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 24 Jan 2006 21:36:58 +0000 Subject: [PATCH] vc++ warning suppression git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8544 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/python/exception/example.h | 11 +++++++---- SWIG/Examples/python/exceptshadow/example.h | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/SWIG/Examples/python/exception/example.h b/SWIG/Examples/python/exception/example.h index 4896059f5..8f9a977b0 100644 --- a/SWIG/Examples/python/exception/example.h +++ b/SWIG/Examples/python/exception/example.h @@ -16,6 +16,10 @@ public: char msg[256]; }; +#if defined(_MSC_VER) + #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + class Test { public: int simple() throw(int) { @@ -43,8 +47,7 @@ public: } }; +#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/python/exceptshadow/example.h b/SWIG/Examples/python/exceptshadow/example.h index 9facde4bd..ec7107a5e 100644 --- a/SWIG/Examples/python/exceptshadow/example.h +++ b/SWIG/Examples/python/exceptshadow/example.h @@ -8,6 +8,10 @@ class FullError { FullError(int m) : maxsize(m) { } }; +#if defined(_MSC_VER) + #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + template class Queue { int maxsize; T *items; @@ -44,8 +48,7 @@ template class Queue { }; +#if defined(_MSC_VER) + #pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif - - - -