Some C++Builder fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-03-15 19:53:30 +00:00
parent 8dfea369ea
commit d834f22c8e
3 changed files with 12 additions and 0 deletions

View File

@@ -70,7 +70,11 @@ public:
wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") ); wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") );
if (wcs) { 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); size_t siz = (::wcslen(wcs)+1)*sizeof(wchar_t);
#endif
m_wcs = (wchar_t *)malloc(siz); m_wcs = (wchar_t *)malloc(siz);
memcpy(m_wcs, wcs, siz); memcpy(m_wcs, wcs, siz);
} }

View File

@@ -454,7 +454,11 @@ size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
} }
return n; return n;
} }
#if defined(__BORLANDC__) && (__BORLANDC__ > 0x530)
return std::wcslen(psz);
#else
return ::wcslen(psz); return ::wcslen(psz);
#endif
} }
#endif #endif

View File

@@ -476,7 +476,11 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
break; break;
#if !defined(__WATCOMC__) && ! (defined(__BORLANDC__) && (__BORLANDC__ < 0x500)) #if !defined(__WATCOMC__) && ! (defined(__BORLANDC__) && (__BORLANDC__ < 0x500))
case CF_UNICODETEXT: case CF_UNICODETEXT:
#if (defined(__BORLANDC__) && (__BORLANDC__ > 0x530))
size = std::wcslen((const wchar_t *)pBuf);
#else
size = ::wcslen((const wchar_t *)pBuf); size = ::wcslen((const wchar_t *)pBuf);
#endif
break; break;
#endif #endif
case CF_BITMAP: case CF_BITMAP: