#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