X error handler should be extern C (SunCC warning fix)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-13 16:23:46 +00:00
parent 86ac4a2207
commit fc9b078cc5

View File

@@ -65,9 +65,13 @@ static bool IsMapped(Display *display, Window window)
// Suspends X11 errors. Used when we expect errors but they are not fatal // Suspends X11 errors. Used when we expect errors but they are not fatal
// for us. // for us.
extern "C" { extern "C"
{
typedef int (*wxX11ErrorHandler)(Display *, XErrorEvent *);
static int wxX11ErrorsSuspender_handler(Display*, XErrorEvent*) { return 0; } static int wxX11ErrorsSuspender_handler(Display*, XErrorEvent*) { return 0; }
} }
class wxX11ErrorsSuspender class wxX11ErrorsSuspender
{ {
public: public:
@@ -83,7 +87,7 @@ public:
private: private:
Display *m_display; Display *m_display;
int (*m_old)(Display*, XErrorEvent *); wxX11ErrorHandler m_old;
}; };