X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..bedaf53eaf4e2a860b34d4ff5e0b1928ce8fa5c9:/include/wx/buffer.h?ds=sidebyside diff --git a/include/wx/buffer.h b/include/wx/buffer.h index feb1c3c33f..6556f39cd6 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -28,7 +28,7 @@ class wxCharBuffer public: wxCharBuffer(const char *str) { - wxASSERT_MSG( str, T("NULL string in wxCharBuffer") ); + wxASSERT_MSG( str, wxT("NULL string in wxCharBuffer") ); m_str = str ? strdup(str) : (char *)NULL; } @@ -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]; } @@ -67,10 +68,14 @@ class wxWCharBuffer public: wxWCharBuffer(const wchar_t *wcs) { - wxASSERT_MSG( wcs, T("NULL string in wxWCharBuffer") ); + wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") ); if (wcs) { - size_t siz = (wcslen(wcs)+1)*sizeof(wchar_t); +#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]; }