From 0350744a7dde82c916e019bf50083635bb30d891 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Fri, 17 Apr 2009 06:23:07 +0000 Subject: [PATCH] add GetChars() --- include/macros.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/macros.h b/include/macros.h index 972a4d9bbe..36fdaa1700 100644 --- a/include/macros.h +++ b/include/macros.h @@ -14,6 +14,22 @@ #endif +/** + * Function GetChars + * returns a pointer to the actual character data, either 8 or + * 16 bits wide, depending on how the wxWidgets library was compiled. + * Pointer + */ +const wxChar* GetChars( wxString s ) +{ +#if wxCHECK_VERSION(2,9,0) + return (const wxChar*) s.wx_str(); +#else + return s.GetData(); +#endif +} + + #ifndef MIN #define MIN( x, y ) ( (x) > (y) ? (y) : (x) ) #endif