From a658cc52aa32f94ebd4be43b047badfa04c75257 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 12 Jan 2006 22:36:04 +0000 Subject: [PATCH] remove unnecessary exception specifications, thereby preventing Visual Studio from having epileptic warnings fits filling the screen with heaps of compete and utter rubbish because it doesn't handle exception specifications properly. Marcelo, please check that this doesn't remove any generated catch handlers. I dont' feel up to chasing a million and one macros to be sure. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8397 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/python/pyiterators.swg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SWIG/Lib/python/pyiterators.swg b/SWIG/Lib/python/pyiterators.swg index 3e4395bb6..905f486ae 100644 --- a/SWIG/Lib/python/pyiterators.swg +++ b/SWIG/Lib/python/pyiterators.swg @@ -161,7 +161,7 @@ namespace swig { } %fragment("PySwigIterator_T","header",fragment="StdTraits") { -#include +%#include namespace swig { template @@ -183,7 +183,7 @@ namespace swig { } - bool equal (const PySwigIterator &iter) const throw (std::invalid_argument) + bool equal (const PySwigIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { @@ -193,7 +193,7 @@ namespace swig { } } - ptrdiff_t distance(const PySwigIterator &iter) const throw (std::invalid_argument) + ptrdiff_t distance(const PySwigIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { @@ -237,7 +237,7 @@ namespace swig { { } - PyObject *value() const throw (stop_iteration) { + PyObject *value() const { return from(static_cast(*(base::current))); } @@ -246,7 +246,7 @@ namespace swig { return new self_type(*this); } - PySwigIterator *incr(size_t n = 1) throw (stop_iteration) + PySwigIterator *incr(size_t n = 1) { while (n--) { ++base::current; @@ -254,7 +254,7 @@ namespace swig { return this; } - PySwigIterator *decr(size_t n = 1) throw (stop_iteration) + PySwigIterator *decr(size_t n = 1) { while (n--) { --base::current; @@ -280,7 +280,7 @@ namespace swig { { } - PyObject *value() const throw (stop_iteration) { + PyObject *value() const { if (base::current == end) { throw stop_iteration(); } else { @@ -293,7 +293,7 @@ namespace swig { return new self_type(*this); } - PySwigIterator *incr(size_t n = 1) throw (stop_iteration) + PySwigIterator *incr(size_t n = 1) { while (n--) { if (base::current == end) { @@ -305,7 +305,7 @@ namespace swig { return this; } - PySwigIterator *decr(size_t n = 1) throw (stop_iteration) + PySwigIterator *decr(size_t n = 1) { while (n--) { if (base::current == begin) {