X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6901ac371fdedbd206ba0eee5f5d3e47ffbf9663..9e1fc0e42822fdf1159582f1b73cde0c7d15bc92:/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