diff -wruN -x '*~' ../orig-swig-2.0.4/Lib/python/pycontainer.swg ./Lib/python/pycontainer.swg --- ../orig-swig-2.0.4/Lib/python/pycontainer.swg 2011-09-20 12:14:29.000000000 +0200 +++ ./Lib/python/pycontainer.swg 2011-09-20 12:13:22.000000000 +0200 @@ -189,7 +189,7 @@ namespace swig { inline size_t - check_index(ptrdiff_t i, size_t size, bool insert = false) { + check_index(std::ptrdiff_t i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); @@ -203,7 +203,7 @@ } inline size_t - slice_index(ptrdiff_t i, size_t size) { + slice_index(std::ptrdiff_t i, size_t size) { if ( i < 0 ) { if ((size_t) (-i) <= size) { return (size_t) (i + size); diff -wruN -x '*~' ../orig-swig-2.0.4/Lib/python/pyiterators.swg ./Lib/python/pyiterators.swg --- ../orig-swig-2.0.4/Lib/python/pyiterators.swg 2011-04-29 20:25:16.000000000 +0200 +++ ./Lib/python/pyiterators.swg 2011-09-20 12:14:10.000000000 +0200 @@ -41,7 +41,7 @@ } // Random access iterator methods, but not required in Python - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const + virtual std::ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } @@ -78,7 +78,7 @@ return obj; } - SwigPyIterator *advance(ptrdiff_t n) + SwigPyIterator *advance(std::ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } @@ -93,27 +93,27 @@ return ! operator==(x); } - SwigPyIterator& operator += (ptrdiff_t n) + SwigPyIterator& operator += (std::ptrdiff_t n) { return *advance(n); } - SwigPyIterator& operator -= (ptrdiff_t n) + SwigPyIterator& operator -= (std::ptrdiff_t n) { return *advance(-n); } - SwigPyIterator* operator + (ptrdiff_t n) const + SwigPyIterator* operator + (std::ptrdiff_t n) const { return copy()->advance(n); } - SwigPyIterator* operator - (ptrdiff_t n) const + SwigPyIterator* operator - (std::ptrdiff_t n) const { return copy()->advance(-n); } - ptrdiff_t operator - (const SwigPyIterator& x) const + std::ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } @@ -170,7 +170,7 @@ } } - ptrdiff_t distance(const SwigPyIterator &iter) const + std::ptrdiff_t distance(const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { @@ -334,8 +334,8 @@ Mark methods that return new objects */ %newobject SwigPyIterator::copy; - %newobject SwigPyIterator::operator + (ptrdiff_t n) const; - %newobject SwigPyIterator::operator - (ptrdiff_t n) const; + %newobject SwigPyIterator::operator + (std::ptrdiff_t n) const; + %newobject SwigPyIterator::operator - (std::ptrdiff_t n) const; %nodirector SwigPyIterator; @@ -356,11 +356,11 @@ %catches(swig::stop_iteration) SwigPyIterator::__next__(); %catches(swig::stop_iteration) SwigPyIterator::next(); %catches(swig::stop_iteration) SwigPyIterator::previous(); - %catches(swig::stop_iteration) SwigPyIterator::advance(ptrdiff_t n); - %catches(swig::stop_iteration) SwigPyIterator::operator += (ptrdiff_t n); - %catches(swig::stop_iteration) SwigPyIterator::operator -= (ptrdiff_t n); - %catches(swig::stop_iteration) SwigPyIterator::operator + (ptrdiff_t n) const; - %catches(swig::stop_iteration) SwigPyIterator::operator - (ptrdiff_t n) const; + %catches(swig::stop_iteration) SwigPyIterator::advance(std::ptrdiff_t n); + %catches(swig::stop_iteration) SwigPyIterator::operator += (std::ptrdiff_t n); + %catches(swig::stop_iteration) SwigPyIterator::operator -= (std::ptrdiff_t n); + %catches(swig::stop_iteration) SwigPyIterator::operator + (std::ptrdiff_t n) const; + %catches(swig::stop_iteration) SwigPyIterator::operator - (std::ptrdiff_t n) const; struct SwigPyIterator { @@ -380,7 +380,7 @@ virtual SwigPyIterator *decr(size_t n = 1); // Random access iterator methods, but not required in Python - virtual ptrdiff_t distance(const SwigPyIterator &x) const; + virtual std::ptrdiff_t distance(const SwigPyIterator &x) const; virtual bool equal (const SwigPyIterator &x) const; @@ -390,15 +390,15 @@ PyObject *next(); PyObject *__next__(); PyObject *previous(); - SwigPyIterator *advance(ptrdiff_t n); + SwigPyIterator *advance(std::ptrdiff_t n); bool operator == (const SwigPyIterator& x) const; bool operator != (const SwigPyIterator& x) const; - SwigPyIterator& operator += (ptrdiff_t n); - SwigPyIterator& operator -= (ptrdiff_t n); - SwigPyIterator* operator + (ptrdiff_t n) const; - SwigPyIterator* operator - (ptrdiff_t n) const; - ptrdiff_t operator - (const SwigPyIterator& x) const; + SwigPyIterator& operator += (std::ptrdiff_t n); + SwigPyIterator& operator -= (std::ptrdiff_t n); + SwigPyIterator* operator + (std::ptrdiff_t n) const; + SwigPyIterator* operator - (std::ptrdiff_t n) const; + std::ptrdiff_t operator - (const SwigPyIterator& x) const; }; }