Commit cb285c57 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Safer macros locale conversion macros for WxWidgets.

parent 77603707
...@@ -99,10 +99,10 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 ); ...@@ -99,10 +99,10 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
* through wxString::wc_str(); they are lost when using mb_str(). * through wxString::wc_str(); they are lost when using mb_str().
*/ */
#if defined( wxUSE_UNICODE ) && defined( WIN32 ) #if defined( wxUSE_UNICODE ) && defined( WIN32 )
# define wxFromLocale(wxstring) FromWide(wxstring.wc_str()) # define wxFromLocale(wxstring) FromWide((wxstring).wc_str())
# define wxLocaleFree(string) free(string) # define wxLocaleFree(string) free(string)
#else #else
# define wxFromLocale(wxstring) FromLocale(wxstring.mb_str()) # define wxFromLocale(wxstring) FromLocale((wxstring).mb_str())
# define wxLocaleFree(string) LocaleFree(string) # define wxLocaleFree(string) LocaleFree(string)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment