X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbaa16de075ca1f81ee663f11a67cecf4c0eb7bd..5df8beb1d95030c94f678458fc1980049f537992:/include/wx/log.h diff --git a/include/wx/log.h b/include/wx/log.h index a4d800e623..01d37ca61d 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -14,10 +14,6 @@ #include "wx/defs.h" -#if wxUSE_THREADS - class WXDLLIMPEXP_FWD_BASE wxCriticalSection; -#endif - // ---------------------------------------------------------------------------- // common constants for use in wxUSE_LOG/!wxUSE_LOG // ---------------------------------------------------------------------------- @@ -55,9 +51,11 @@ typedef unsigned long wxLogLevel; #include "wx/arrstr.h" +#ifndef __WXPALMOS5__ #ifndef __WXWINCE__ #include // for time_t #endif +#endif // ! __WXPALMOS5__ #include "wx/dynarray.h" @@ -200,8 +198,7 @@ public: static void SetTraceMask(wxTraceMask ulMask) { ms_ulTraceMask = ulMask; } // add string trace mask - static void AddTraceMask(const wxString& str) - { ms_aTraceMasks.push_back(str); } + static void AddTraceMask(const wxString& str); // add string trace mask static void RemoveTraceMask(const wxString& str); @@ -209,8 +206,9 @@ public: // remove all string trace masks static void ClearTraceMasks(); - // get string trace masks - static const wxArrayString &GetTraceMasks() { return ms_aTraceMasks; } + // get string trace masks: note that this is MT-unsafe if other threads can + // call AddTraceMask() concurrently + static const wxArrayString& GetTraceMasks() { return ms_aTraceMasks; } // sets the time stamp string format: this is used as strftime() format // string for the log targets which add time stamps to the messages; set @@ -322,9 +320,6 @@ private: // with the number of times it was repeated static bool ms_bRepetCounting; -#if wxUSE_THREADS - static wxCriticalSection ms_prevCS; // protects the ms_prev values below -#endif static wxString ms_prevString; // previous message that was logged static unsigned ms_prevCounter; // how many times it was repeated static time_t ms_prevTimeStamp;// timestamp of the previous message