diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 51c837336f..a47a3e2cc7 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -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 diff --git a/include/wx/string.h b/include/wx/string.h index 0455a59df1..1c5f303b90 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -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