SyFi 0.3
|
Public Member Functions | |
bool | operator() (PyObject *v, PyObject *w) const |
Definition at line 3764 of file SyFi_wrap.cc.
bool std::less< PyObject * >::operator() | ( | PyObject * | v, |
PyObject * | w | ||
) | const [inline] |
Definition at line 3767 of file SyFi_wrap.cc.
References run_all::res, SWIG_PYTHON_THREAD_BEGIN_BLOCK, and SWIG_PYTHON_THREAD_END_BLOCK.
{ bool res; SWIG_PYTHON_THREAD_BEGIN_BLOCK; res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; /* This may fall into a case of inconsistent eg. ObjA > ObjX > ObjB but ObjA < ObjB */ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) { /* Objects can't be compared, this mostly occurred in Python 3.0 */ /* Compare their ptr directly for a workaround */ res = (v < w); PyErr_Clear(); } SWIG_PYTHON_THREAD_END_BLOCK; return res; }