From: Julian Smart Date: Wed, 15 Mar 2000 19:53:30 +0000 (+0000) Subject: Some C++Builder fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d834f22c8e4248e8c035643ec1894a4cfd038419?ds=sidebyside Some C++Builder fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 9f9eb174b7..d64ed386e6 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -70,7 +70,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); } diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 9c423ebda5..d2b1144af8 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -454,7 +454,11 @@ size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const } return n; } +#if defined(__BORLANDC__) && (__BORLANDC__ > 0x530) + return std::wcslen(psz); +#else return ::wcslen(psz); +#endif } #endif diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index fdcae65b8b..59ca12f9a4 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -476,7 +476,11 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, break; #if !defined(__WATCOMC__) && ! (defined(__BORLANDC__) && (__BORLANDC__ < 0x500)) case CF_UNICODETEXT: +#if (defined(__BORLANDC__) && (__BORLANDC__ > 0x530)) + size = std::wcslen((const wchar_t *)pBuf); +#else size = ::wcslen((const wchar_t *)pBuf); +#endif break; #endif case CF_BITMAP: