MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SwigPyObject_richcompare

Function SwigPyObject_richcompare

swig/python/export_wrap.cpp:1632–1642  ·  view source on GitHub ↗

Added for Python 3.x, would it also be useful for Python 2.x? */

Source from the content-addressed store, hash-verified

1630
1631/* Added for Python 3.x, would it also be useful for Python 2.x? */
1632SWIGRUNTIME PyObject*
1633SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1634{
1635 PyObject* res;
1636 if( op != Py_EQ && op != Py_NE ) {
1637 Py_INCREF(Py_NotImplemented);
1638 return Py_NotImplemented;
1639 }
1640 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1641 return res;
1642}
1643
1644
1645SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

Callers

nothing calls this directly

Calls 2

PyBool_FromLongFunction · 0.85
SwigPyObject_compareFunction · 0.85

Tested by

no test coverage detected