From: Robin Dunn Date: Wed, 14 Nov 2001 18:46:47 +0000 (+0000) Subject: A fix for when wxPython is compiled with no threads X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/00ca6262d110264500eb263d1c2695cca55a6b0d 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 --- 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 {