X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/929eed47994d715f3ffccbdf47768a13171da968..7c1cb261228c78cac34ee9f0b08e2674b07c37ee:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index f5f989701a..c2deb9b203 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -189,18 +189,11 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt #endif #ifndef wxSetlocale -WXDLLEXPORT wxChar * wxSetlocale(int category, const wxChar *locale) +WXDLLEXPORT wxWCharBuffer wxSetlocale(int category, const wxChar *locale) { -#ifdef wxUSE_THREADS - wxASSERT_MSG( wxThread::IsMain(), _T("wxSetlocale() is not MT-safe") ); -#endif - - static wxWCharBuffer s_wzLocale; - char *localeOld = setlocale(category, wxConvLibc.cWX2MB(locale)); - s_wzLocale = wxConvLibc.cMB2WC(localeOld); - return s_wzLocale; + return wxWCharBuffer(wxConvLibc.cMB2WC(localeOld)); } #endif