SyFi  0.3
std::less< PyObject * > Struct Template Reference

List of all members.

Public Member Functions

bool operator() (PyObject *v, PyObject *w) const

Detailed Description

template<>
struct std::less< PyObject * >

Definition at line 4051 of file SyFiPYTHON_wrap.cxx.


Member Function Documentation

bool std::less< PyObject * >::operator() ( PyObject *  v,
PyObject *  w 
) const [inline]

Definition at line 4054 of file SyFiPYTHON_wrap.cxx.

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;
    }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines