X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6901ac371fdedbd206ba0eee5f5d3e47ffbf9663..bc07ab17bf5370f452e899128bf89cc7ca7b98f0:/include/wx/buffer.h diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 1c54c50404..f17aa0c1ab 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -64,6 +64,12 @@ public: \ return p; \ } \ \ + void reset() \ + { \ + free(m_str); \ + m_str = NULL; \ + } \ + \ classname(const classname& src) \ : m_str(src.release()) \ { \ @@ -116,11 +122,15 @@ DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW); #undef DEFINE_BUFFER #if wxUSE_UNICODE + typedef wxWCharBuffer wxWxCharBuffer; + #define wxMB2WXbuf wxWCharBuffer #define wxWX2MBbuf wxCharBuffer #define wxWC2WXbuf wxChar* #define wxWX2WCbuf wxChar* #else // ANSI + typedef wxCharBuffer wxWxCharBuffer; + #define wxMB2WXbuf wxChar* #define wxWX2MBbuf wxChar* #define wxWC2WXbuf wxCharBuffer