Fixes to support Python 3.0.1 and higher.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11143 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Haoyu Bai 2009-03-02 17:56:29 +00:00
commit caa6f2b9fa
4 changed files with 32 additions and 17 deletions

View file

@ -115,7 +115,7 @@ namespace std {
{
bool res;
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
res = PyObject_Compare(v, w) < 0;
res = PyObject_RichCompareBool(v, w, Py_LT);
/* This may fall into a case of inconsistent
eg. ObjA > ObjX > ObjB
but ObjA < ObjB