From db9351e83a1d2eda6a3448c9fa8eb2d9cde2d598 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 17 Nov 2012 22:43:48 +0000 Subject: [PATCH] Use PyObject_RichCompareBool instead of PyObject_Cmp, for Python3 compatibility and because it's a better API git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- TODO.txt | 2 -- src/wxpy_api.sip | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO.txt b/TODO.txt index eba912f4..4f35b093 100644 --- a/TODO.txt +++ b/TODO.txt @@ -140,8 +140,6 @@ other dev stuff * Add _propdlg module - * Finish _dataview module - * Add _html2 module (webview) * Add _xrc module (containg xrc and xml classes) diff --git a/src/wxpy_api.sip b/src/wxpy_api.sip index 283586d7..2c5df458 100644 --- a/src/wxpy_api.sip +++ b/src/wxpy_api.sip @@ -256,10 +256,8 @@ bool wxVariantDataPyObject::Eq(wxVariantData& data) const wxT("wxVariantDataPyObject::Eq: argument mismatch") ); wxVariantDataPyObject& otherData = (wxVariantDataPyObject&) data; - int result; wxPyThreadBlocker blocker; - PyObject_Cmp(BorrowData(), otherData.BorrowData(), &result); - return result == 0; + return PyObject_RichCompareBool(BorrowData(), otherData.BorrowData(), Py_EQ); }