X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/607a3fa066378bd969ceb0803dad87611c460e8d..f5158fa61f150b8a11f175588f2c6afe455ff7fe:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index d6f7f1c6ef..ec563fc7f2 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1534,8 +1534,33 @@ public: void SetCol( int n ); void Set( int row, int col ); - bool operator==( const wxGridCellCoords& other ) const; - bool operator!=( const wxGridCellCoords& other ) const; + %extend { + KeepGIL(__eq__); + DocStr(__eq__, "Test for equality of GridCellCoords objects.", ""); + bool __eq__(PyObject* other) { + wxGridCellCoords temp, *obj = &temp; + if ( other == Py_None ) return false; + if ( ! wxGridCellCoords_helper(other, &obj) ) { + PyErr_Clear(); + return false; + } + return self->operator==(*obj); + } + + + KeepGIL(__ne__); + DocStr(__ne__, "Test for inequality of GridCellCoords objects.", ""); + bool __ne__(PyObject* other) { + wxGridCellCoords temp, *obj = &temp; + if ( other == Py_None ) return true; + if ( ! wxGridCellCoords_helper(other, &obj)) { + PyErr_Clear(); + return true; + } + return self->operator!=(*obj); + } + } + %extend { PyObject* Get() {