added wxABI_VERSION checks around wxString::[w]char_str()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -111,6 +111,7 @@ private: \
|
||||
chartype *m_str; \
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20804
|
||||
// needed for wxString::char_str() and wchar_str()
|
||||
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
|
||||
class WXDLLIMPEXP_BASE classname : public baseclass \
|
||||
@@ -121,14 +122,19 @@ public: \
|
||||
\
|
||||
operator chartype*() { return this->data(); } \
|
||||
}
|
||||
#endif // wxABI_VERSION >= 20804
|
||||
|
||||
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
|
||||
#endif
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
||||
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_WCHAR_T
|
||||
|
||||
|
@@ -836,6 +836,7 @@ public:
|
||||
// identical to c_str(), for MFC compatibility
|
||||
const wxChar* GetData() const { return c_str(); }
|
||||
|
||||
#if wxABI_VERSION >= 20804
|
||||
// conversion to *non-const* multibyte or widestring buffer; modifying
|
||||
// returned buffer won't affect the string, these methods are only useful
|
||||
// for passing values to const-incorrect functions
|
||||
@@ -844,6 +845,7 @@ public:
|
||||
#if wxUSE_WCHAR_T
|
||||
wxWritableWCharBuffer wchar_str() const { return wc_str(wxConvLibc); }
|
||||
#endif
|
||||
#endif // wxABI_VERSION >= 20804
|
||||
|
||||
// conversion to/from plain (i.e. 7 bit) ASCII: this is useful for
|
||||
// converting numbers or strings which are certain not to contain special
|
||||
|
Reference in New Issue
Block a user