#include "wx/regex.h"
+#if wxUSE_UNICODE
+ #define regerror wx_regerror
+ #define regfree wx_regfree
+#endif
+
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// compile it
-#if wxUSE_NEW_REGEX
+#if wxUSE_UNICODE
int errorcode = wx_regcomp(&m_RegEx, expr, expr.Length(), flagsRE);
#else
int errorcode = regcomp(&m_RegEx, expr.mb_str(), flagsRE);
}
// do match it
-#ifdef wxUSE_NEW_REGEX
+#if wxUSE_UNICODE
rm_detail_t rd;
int rc = wx_regexec(&self->m_RegEx, str, wxStrlen(str), &rd, m_nMatches, m_Matches, flagsRE);
#else