X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3b177ae6310ed80f054ae227513ef681f9c3dad..abb69c6c82d61cf18f14270650a68896a3d8ed47:/include/wx/buffer.h?ds=inline diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 9f9eb174b7..6556f39cd6 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -54,6 +54,7 @@ public: return *this; } + const char *data() const { return m_str; } operator const char *() const { return m_str; } char operator[](size_t n) const { return m_str[n]; } @@ -70,7 +71,11 @@ public: wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") ); if (wcs) { +#if (defined(__BORLANDC__) && (__BORLANDC__ > 0x530)) + size_t siz = (std::wcslen(wcs)+1)*sizeof(wchar_t); +#else size_t siz = (::wcslen(wcs)+1)*sizeof(wchar_t); +#endif m_wcs = (wchar_t *)malloc(siz); memcpy(m_wcs, wcs, siz); } @@ -99,6 +104,7 @@ public: return *this; } + const wchar_t *data() const { return m_wcs; } operator const wchar_t *() const { return m_wcs; } wchar_t operator[](size_t n) const { return m_wcs[n]; }