X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7e7022c2c800a01e0b95d371fb213b0d25e3214..bf44306ebca5d26e204ef17851516d844bc2f0a7:/wxPython/src/events.i diff --git a/wxPython/src/events.i b/wxPython/src/events.i index 029e29bdd6..e6933f8e25 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -89,6 +89,18 @@ public: void SetExtraLong(long extraLong); void SetInt(int i); + %addmethods { + PyObject* GetClientData() { + wxPyClientData* data = (wxPyClientData*)self->GetClientObject(); + if (data) { + Py_INCREF(data->m_obj); + return data->m_obj; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + } };