]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wxchar.cpp
1. more warnings fixes in gtk/region.cpp and common/tbarsmpl.cpp
[wxWidgets.git] / src / common / wxchar.cpp
index f5f989701ad396be7c026dc8330eb1ac97ef9386..c2deb9b203f7e07da49a1659989851071dda8f37 100644 (file)
@@ -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