MCPcopy Create free account
hub / github.com/SamuraiT/mecab-python3 / SwigPyObject_richcompare

Function SwigPyObject_richcompare

src/MeCab/MeCab_wrap.cpp:1476–1486  ·  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

1474
1475/* Added for Python 3.x, would it also be useful for Python 2.x? */
1476SWIGRUNTIME PyObject*
1477SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1478{
1479 PyObject* res;
1480 if( op != Py_EQ && op != Py_NE ) {
1481 Py_INCREF(Py_NotImplemented);
1482 return Py_NotImplemented;
1483 }
1484 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1485 return res;
1486}
1487
1488
1489SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

Calls 1

SwigPyObject_compareFunction · 0.85

Tested by

no test coverage detected