From 00ca6262d110264500eb263d1c2695cca55a6b0d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 14 Nov 2001 18:46:47 +0000 Subject: [PATCH] A fix for when wxPython is compiled with no threads git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/misc2.cpp | 4 ++++ wxPython/src/misc2.i | 4 ++++ wxPython/src/msw/misc2.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index 6e5a51c59e..051cb332bf 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -145,7 +145,11 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc bool wxThread_IsMain() { +#ifdef WXP_WITH_THREAD return wxThread::IsMain(); +#else + return TRUE; +#endif } class wxPyTipProvider : public wxTipProvider { diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 9b49096983..9da8e9f530 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -410,7 +410,11 @@ public: %inline %{ bool wxThread_IsMain() { +#ifdef WXP_WITH_THREAD return wxThread::IsMain(); +#else + return TRUE; +#endif } %} diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index f949974082..0d19b32cbe 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -145,7 +145,11 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc bool wxThread_IsMain() { +#ifdef WXP_WITH_THREAD return wxThread::IsMain(); +#else + return TRUE; +#endif } class wxPyTipProvider : public wxTipProvider { -- 2.47.2