final compilo fixups for 10.2 unicode - c/c++ fixes for regex - fixup regex unit tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1e15159472
commit
30261041bc
3 changed files with 82 additions and 37 deletions
|
|
@ -144,6 +144,17 @@ RegExTestCase::RegExTestCase(
|
|||
#endif
|
||||
}
|
||||
|
||||
int wxWcscmp(const wchar_t* s1, const wchar_t* s2)
|
||||
{
|
||||
size_t nLen1 = wxWcslen(s1);
|
||||
size_t nLen2 = wxWcslen(s2);
|
||||
|
||||
if (nLen1 != nLen2)
|
||||
return nLen1 - nLen2;
|
||||
|
||||
return wxMemcmp(s1, s2, nLen1);
|
||||
}
|
||||
|
||||
// convert a string from UTF8 to the internal encoding
|
||||
//
|
||||
wxString RegExTestCase::Conv(const char *str)
|
||||
|
|
@ -151,7 +162,7 @@ wxString RegExTestCase::Conv(const char *str)
|
|||
const wxWCharBuffer wstr = wxConvUTF8.cMB2WC(str);
|
||||
const wxWC2WXbuf buf = wxConvCurrent->cWC2WX(wstr);
|
||||
|
||||
if (!buf || wcscmp(wxConvCurrent->cWX2WC(buf), wstr) != 0)
|
||||
if (!buf || wxWcscmp(wxConvCurrent->cWX2WC(buf), wstr) != 0)
|
||||
return convError();
|
||||
else
|
||||
return buf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue