Unicode compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,9 +127,17 @@ wxString wxRegExImpl::GetErrorMsg(int errorcode) const
|
|||||||
{
|
{
|
||||||
len++;
|
len++;
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxCharBuffer buf(len);
|
||||||
|
|
||||||
|
(void)regerror(errorcode, &m_RegEx, (char *)buf.data(), len);
|
||||||
|
|
||||||
|
msg = buf.data();
|
||||||
|
#else // !Unicode
|
||||||
(void)regerror(errorcode, &m_RegEx, msg.GetWriteBuf(len), len);
|
(void)regerror(errorcode, &m_RegEx, msg.GetWriteBuf(len), len);
|
||||||
|
|
||||||
msg.UngetWriteBuf();
|
msg.UngetWriteBuf();
|
||||||
|
#endif // Unicode/!Unicode
|
||||||
}
|
}
|
||||||
else // regerror() returned 0
|
else // regerror() returned 0
|
||||||
{
|
{
|
||||||
@@ -159,7 +167,7 @@ bool wxRegExImpl::Compile(const wxString& expr, int flags)
|
|||||||
flagsRE |= REG_NEWLINE;
|
flagsRE |= REG_NEWLINE;
|
||||||
|
|
||||||
// compile it
|
// compile it
|
||||||
int errorcode = regcomp(&m_RegEx, expr, flagsRE);
|
int errorcode = regcomp(&m_RegEx, expr.mb_str(), flagsRE);
|
||||||
if ( errorcode )
|
if ( errorcode )
|
||||||
{
|
{
|
||||||
wxLogError(_("Invalid regular expression '%s': %s"),
|
wxLogError(_("Invalid regular expression '%s': %s"),
|
||||||
@@ -230,7 +238,7 @@ bool wxRegExImpl::Matches(const wxChar *str, int flags) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// do match it
|
// do match it
|
||||||
int rc = regexec(&self->m_RegEx, str, m_nMatches, m_Matches, flagsRE);
|
int rc = regexec(&self->m_RegEx, wxConvertWX2MB(str), m_nMatches, m_Matches, flagsRE);
|
||||||
|
|
||||||
switch ( rc )
|
switch ( rc )
|
||||||
{
|
{
|
||||||
|
@@ -59,8 +59,8 @@
|
|||||||
# pragma warning(default:4115) /* named type definition in parentheses */
|
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
#define CLASSNAME TEXT("_GSocket_Internal_Window_Class")
|
||||||
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
#define WINDOWNAME TEXT("_GSocket_Internal_Window_Name")
|
||||||
|
|
||||||
/* Maximum number of different GSocket objects at a given time.
|
/* Maximum number of different GSocket objects at a given time.
|
||||||
* This value can be modified at will, but it CANNOT be greater
|
* This value can be modified at will, but it CANNOT be greater
|
||||||
|
Reference in New Issue
Block a user