- DocDeclStr(
- bool, operator==(const wxPoint2D& pt) const,
- "Test for equality", "");
-
- DocDeclStr(
- bool, operator!=(const wxPoint2D& pt) const,
- "Test for inequality", "");
+ %extend {
+ KeepGIL(__eq__);
+ DocStr(__eq__, "Test for equality of wx.Point2D objects.", "");
+ bool __eq__(PyObject* other) {
+ wxPoint2D temp, *obj = &temp;
+ if ( other == Py_None ) return false;
+ if ( ! wxPoint2D_helper(other, &obj) ) {
+ PyErr_Clear();
+ return false;
+ }
+ return self->operator==(*obj);
+ }
+
+
+ KeepGIL(__ne__);
+ DocStr(__ne__, "Test for inequality of wx.Point2D objects.", "");
+ bool __ne__(PyObject* other) {
+ wxPoint2D temp, *obj = &temp;
+ if ( other == Py_None ) return true;
+ if ( ! wxPoint2D_helper(other, &obj)) {
+ PyErr_Clear();
+ return true;
+ }
+ return self->operator!=(*obj);
+ }
+ }