summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/python/pycontainer.swg4
-rw-r--r--Lib/swigrun.swg2
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg
index 638a2b1c9..18d200411 100644
--- a/Lib/python/pycontainer.swg
+++ b/Lib/python/pycontainer.swg
@@ -334,7 +334,7 @@ namespace swig
typedef Reference reference;
typedef T value_type;
typedef T* pointer;
- typedef ptrdiff_t difference_type;
+ typedef int difference_type;
PySequence_InputIterator()
{
@@ -417,7 +417,7 @@ namespace swig
private:
PyObject* _seq;
- int _index;
+ difference_type _index;
};
template <class T>
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg
index edfd26824..36b2a465a 100644
--- a/Lib/swigrun.swg
+++ b/Lib/swigrun.swg
@@ -229,7 +229,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
while ((*f1 == ' ') && (f1 != l1)) ++f1;
while ((*f2 == ' ') && (f2 != l2)) ++f2;
- if (*f1 != *f2) return (int)(*f1 - *f2);
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
}
return (l1 - f1) - (l2 - f2);
}