Public Member Functions | |
bool | operator() (PyObject *v, PyObject *w) const |
Definition at line 3767 of file SyFi_wrap.cc.
bool std::less< PyObject * >::operator() | ( | PyObject * | v, | |
PyObject * | w | |||
) | const [inline] |
Definition at line 3770 of file SyFi_wrap.cc.
References run_all::res, SWIG_PYTHON_THREAD_BEGIN_BLOCK, and SWIG_PYTHON_THREAD_END_BLOCK.
03771 { 03772 bool res; 03773 SWIG_PYTHON_THREAD_BEGIN_BLOCK; 03774 res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; 03775 /* This may fall into a case of inconsistent 03776 eg. ObjA > ObjX > ObjB 03777 but ObjA < ObjB 03778 */ 03779 if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) 03780 { 03781 /* Objects can't be compared, this mostly occured in Python 3.0 */ 03782 /* Compare their ptr directly for a workaround */ 03783 res = (v < w); 03784 PyErr_Clear(); 03785 } 03786 SWIG_PYTHON_THREAD_END_BLOCK; 03787 return res; 03788 }