rolled back exceptions handling patch, it relied on incorrect assumption about vtables

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2005-06-21 09:56:18 +00:00
parent 87b72f94f3
commit 96d38c7e0d
7 changed files with 62 additions and 102 deletions

View File

@@ -2295,8 +2295,6 @@ protected:
// wxEvtHandler: the base class for all objects handling wxWidgets events
// ----------------------------------------------------------------------------
typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject
{
public:
@@ -2324,15 +2322,6 @@ public:
bool ProcessThreadEvent(wxEvent& event);
#endif
#if wxUSE_EXCEPTIONS
// call the specified handler with the given event
//
// this method only exists to allow catching the exceptions thrown by any
// event handler, it would lead to an extra (useless) virtual function call
// if the exceptions were not used, so it doesn't even exist in that case
virtual void DoHandleEvent(wxEventFunction func, wxEvent& event);
#endif // wxUSE_EXCEPTIONS
// Dynamic association of a member function handler with the event handler,
// winid and event type
void Connect(int winid,
@@ -2493,6 +2482,8 @@ inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event)
dest->AddPendingEvent(event);
}
typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
#define wxEventHandler(func) \
(wxObjectEventFunction)wxStaticCastEvent(wxEventFunction, &func)