- void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("OnLinkClicked")) {
- PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo");
- m_myInst.callCallback(Py_BuildValue("(O)", obj));
+void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
+ bool found;
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked)"))) {
+ PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0);
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));