]> git.saurik.com Git - wxWidgets.git/commitdiff
Some C++Builder fixes
authorJulian Smart <julian@anthemion.co.uk>
Wed, 15 Mar 2000 19:53:30 +0000 (19:53 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 15 Mar 2000 19:53:30 +0000 (19:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/buffer.h
src/common/strconv.cpp
src/msw/ole/dataobj.cpp

index 9f9eb174b751e409a07ad20283183e2529f18e2d..d64ed386e61666750e5f1841ccae6d09bb519930 100644 (file)
@@ -70,7 +70,11 @@ public:
         wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") );
 
         if (wcs) {
         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);
           size_t siz = (::wcslen(wcs)+1)*sizeof(wchar_t);
+#endif
           m_wcs = (wchar_t *)malloc(siz);
           memcpy(m_wcs, wcs, siz);
         }
           m_wcs = (wchar_t *)malloc(siz);
           memcpy(m_wcs, wcs, siz);
         }
index 9c423ebda5435d1de992b78726975ace5e36514a..d2b1144af8c8851d9bfab2f969d2eb2fa8c2b238 100644 (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
index fdcae65b8b9dc5e3662b702b8afdaac3069632dc..59ca12f9a43aebdd3e262dfa9fc42a35f2678f5e 100644 (file)
@@ -476,7 +476,11 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
                         break;
 #if !defined(__WATCOMC__) && ! (defined(__BORLANDC__) && (__BORLANDC__ < 0x500))
                     case CF_UNICODETEXT:
                         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);
                         size = ::wcslen((const wchar_t *)pBuf);
+#endif
                         break;
 #endif
                     case CF_BITMAP:
                         break;
 #endif
                     case CF_BITMAP: