diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index d4e882841d..6ce10590a9 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -3671,8 +3671,9 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw static bool wxColour___eq__(wxColour *self,PyObject * obj) { wxColour tmp; wxColour* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxColour_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxColour___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -3709,8 +3710,9 @@ static PyObject *_wrap_wxColour___eq__(PyObject *self, PyObject *args, PyObject static bool wxColour___ne__(wxColour *self,PyObject * obj) { wxColour tmp; wxColour* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxColour_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxColour___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 5f624b2a89..c8ef3bc3be 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -326,7 +326,7 @@ class wxColourPtr(wxObjectPtr): return "" % (self.this,) asTuple = Get def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxColour: ' + str(self.asTuple()) + def __repr__(self): return 'wxColour:' + str(self.asTuple()) def __nonzero__(self): return self.Ok() def __getinitargs__(self): return () def __getstate__(self): return self.asTuple() diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 1175d40b17..4fcae32416 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -1371,8 +1371,9 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * static bool wxSize___eq__(wxSize *self,PyObject * obj) { wxSize tmp; wxSize* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxSize_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxSize_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxSize___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1409,8 +1410,9 @@ static PyObject *_wrap_wxSize___eq__(PyObject *self, PyObject *args, PyObject *k static bool wxSize___ne__(wxSize *self,PyObject * obj) { wxSize tmp; wxSize* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxSize_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxSize_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxSize___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1758,8 +1760,9 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj static bool wxRealPoint___eq__(wxRealPoint *self,PyObject * obj) { wxRealPoint tmp; wxRealPoint* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxRealPoint_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxRealPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxRealPoint___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1796,8 +1799,9 @@ static PyObject *_wrap_wxRealPoint___eq__(PyObject *self, PyObject *args, PyObje static bool wxRealPoint___ne__(wxRealPoint *self,PyObject * obj) { wxRealPoint tmp; wxRealPoint* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxRealPoint_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxRealPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxRealPoint___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -2145,8 +2149,9 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject static bool wxPoint___eq__(wxPoint *self,PyObject * obj) { wxPoint tmp; wxPoint* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxPoint_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxPoint___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -2183,8 +2188,9 @@ static PyObject *_wrap_wxPoint___eq__(PyObject *self, PyObject *args, PyObject * static bool wxPoint___ne__(wxPoint *self,PyObject * obj) { wxPoint tmp; wxPoint* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxPoint_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxPoint___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -3400,8 +3406,9 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * static bool wxRect___eq__(wxRect *self,PyObject * obj) { wxRect tmp; wxRect* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxRect_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxRect_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxRect___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -3438,8 +3445,9 @@ static PyObject *_wrap_wxRect___eq__(PyObject *self, PyObject *args, PyObject *k static bool wxRect___ne__(wxRect *self,PyObject * obj) { wxRect tmp; wxRect* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxRect_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxRect_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxRect___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -4259,8 +4267,9 @@ static PyObject *_wrap_wxPoint2DDouble___idiv__(PyObject *self, PyObject *args, static bool wxPoint2DDouble___eq__(wxPoint2DDouble *self,PyObject * obj) { wxPoint2DDouble tmp; wxPoint2DDouble* ptr = &tmp; - if (obj == Py_None) return FALSE; - if (! wxPoint2DDouble_helper(obj, &ptr)) return FALSE; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxPoint2DDouble_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; return *self == *ptr; } static PyObject *_wrap_wxPoint2DDouble___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -4297,8 +4306,9 @@ static PyObject *_wrap_wxPoint2DDouble___eq__(PyObject *self, PyObject *args, Py static bool wxPoint2DDouble___ne__(wxPoint2DDouble *self,PyObject * obj) { wxPoint2DDouble tmp; wxPoint2DDouble* ptr = &tmp; - if (obj == Py_None) return TRUE; - if (! wxPoint2DDouble_helper(obj, &ptr)) return TRUE; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxPoint2DDouble_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; return *self != *ptr; } static PyObject *_wrap_wxPoint2DDouble___ne__(PyObject *self, PyObject *args, PyObject *kwargs) {