From: Václav Slavík Date: Mon, 23 Apr 2007 21:25:26 +0000 (+0000) Subject: compilation fix: setlocale() returns non-const string pointer X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/db2a7aabf936dbae05101322585c1a7fd7ca7c48 compilation fix: setlocale() returns non-const string pointer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index 74a63624d6..bcbbf3027a 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -791,7 +791,7 @@ WXDLLIMPEXP_BASE wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **sa WXDLLIMPEXP_BASE wxWCharBuffer wxSetlocale_(int category, const wxChar *locale); WXDLLIMPEXP_BASE wxWCharBuffer wxSetlocale(int category, const wxChar *locale); #else - WXDLLIMPEXP_BASE const wxChar *wxSetlocale(int category, const wxChar *locale); + WXDLLIMPEXP_BASE wxChar *wxSetlocale(int category, const wxChar *locale); #endif // defined(wxSetlocale_) #endif // __cplusplus diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index 3d12a3bee7..15bc111642 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -820,9 +820,9 @@ wxWCharBuffer wxSetlocale(int category, const wxChar *locale) return rv; } #else // defined(wxSetlocale_) -const wxChar *wxSetlocale(int category, const wxChar *locale) +wxChar *wxSetlocale(int category, const wxChar *locale) { - const wxChar *rv = wxSetlocale_(category, locale); + wxChar *rv = wxSetlocale_(category, locale); if ( rv ) wxUpdateLocaleIsUtf8(); return rv;