diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 910ab84305..b400d2eda9 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -833,12 +833,6 @@ */ #cmakedefine HAVE_BROKEN_LIBSTDCXX_VISIBILITY -/* - * The built-in regex supports advanced REs in additional to POSIX's basic - * and extended. Your system regex probably won't support this, and in this - * case WX_NO_REGEX_ADVANCED should be defined. - */ -#cmakedefine WX_NO_REGEX_ADVANCED /* * On GNU systems use re_search instead of regexec, since the latter does a * strlen on the search text affecting the performance of some operations. diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 4f321a79b5..87fbb66a24 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -201,7 +201,9 @@ Currently the following symbols exist: Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).} @itemdef{wxHAS_RAW_BITMAP, Defined if direct access to bitmap data using the classes in @c wx/rawbmp.h is supported.} @itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.} -@itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.} +@itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in + wxRegEx. This is always the case in wxWidgets 3.1.6 and later, so this + symbol doesn't need to be tested any more.} @itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.} @itemdef{wxHAS_WINDOW_LABEL_IN_STATIC_BOX, Defined if wxStaticBox::Create() overload taking @c wxWindow* instead of the text label is available on the current platform.} diff --git a/include/wx/features.h b/include/wx/features.h index 46ac758cd7..c40265ca73 100644 --- a/include/wx/features.h +++ b/include/wx/features.h @@ -53,13 +53,8 @@ #undef wxHAS_CRASH_REPORT #endif -/* wxRE_ADVANCED is not always available, depending on regex library used - * (it's unavailable only if compiling via configure against system library) */ -#ifndef WX_NO_REGEX_ADVANCED - #define wxHAS_REGEX_ADVANCED -#else - #undef wxHAS_REGEX_ADVANCED -#endif +/* wxRE_ADVANCED is always defined now and kept for compatibility only. */ +#define wxHAS_REGEX_ADVANCED /* Pango-based ports and wxDFB use UTF-8 for text and font encodings * internally and so their fonts can handle any encodings: */ diff --git a/include/wx/osx/config_xcode.h b/include/wx/osx/config_xcode.h index cd68ec14f8..a4be7b9df0 100644 --- a/include/wx/osx/config_xcode.h +++ b/include/wx/osx/config_xcode.h @@ -128,9 +128,6 @@ #define PACKAGE_TARNAME "wxwidgets" #define PACKAGE_VERSION "3.1.6" -// for regex -#define WX_NO_REGEX_ADVANCED 1 - // for jpeg #define HAVE_STDLIB_H 1 diff --git a/include/wx/regex.h b/include/wx/regex.h index 79676de88f..536fbc2bf2 100644 --- a/include/wx/regex.h +++ b/include/wx/regex.h @@ -27,10 +27,8 @@ enum // use extended regex syntax wxRE_EXTENDED = 0, - // use advanced RE syntax (built-in regex only) -#ifdef wxHAS_REGEX_ADVANCED + // use advanced RE syntax (deprecated, same as wxRE_EXTENDED now) wxRE_ADVANCED = 1, -#endif // use basic RE syntax wxRE_BASIC = 2, diff --git a/setup.h.in b/setup.h.in index 895b8f2b57..9ca552a4ce 100644 --- a/setup.h.in +++ b/setup.h.in @@ -833,12 +833,6 @@ */ #undef HAVE_BROKEN_LIBSTDCXX_VISIBILITY -/* - * The built-in regex supports advanced REs in additional to POSIX's basic - * and extended. Your system regex probably won't support this, and in this - * case WX_NO_REGEX_ADVANCED should be defined. - */ -#undef WX_NO_REGEX_ADVANCED /* * On GNU systems use re_search instead of regexec, since the latter does a * strlen on the search text affecting the performance of some operations. diff --git a/setup.h_vms b/setup.h_vms index 249b27cd47..261a3ea2c6 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -901,12 +901,6 @@ typedef pid_t GPid; */ #undef HAVE_BROKEN_LIBSTDCXX_VISIBILITY -/* - * The built-in regex supports advanced REs in additional to POSIX's basic - * and extended. Your system regex probably won't support this, and in this - * case WX_NO_REGEX_ADVANCED should be defined. - */ -#undef WX_NO_REGEX_ADVANCED /* * On GNU systems use re_search instead of regexec, since the latter does a * strlen on the search text affecting the performance of some operations. diff --git a/tests/regex/regextest.cpp b/tests/regex/regextest.cpp index 1178341c95..b7cd1b1817 100644 --- a/tests/regex/regextest.cpp +++ b/tests/regex/regextest.cpp @@ -40,11 +40,6 @@ #endif -// many of the tests are specific to the builtin regex lib, so only attempts -// to do them when using the builtin regex lib. -// -#ifdef wxHAS_REGEX_ADVANCED - #include "wx/regex.h" #include #include @@ -347,10 +342,8 @@ void RegExTestCase::runTest() doTest(wxRE_BASIC); if (m_extended) doTest(wxRE_EXTENDED); -#ifdef wxHAS_REGEX_ADVANCED if (m_advanced || (!m_basic && !m_extended)) doTest(wxRE_ADVANCED); -#endif } // Try the test for a single flavour of expression @@ -492,6 +485,4 @@ CheckRE( #include "regex.inc" -#endif // wxHAS_REGEX_ADVANCED - #endif // wxUSE_REGEX diff --git a/tests/regex/wxregextest.cpp b/tests/regex/wxregextest.cpp index db0ab088cc..4bc6463f06 100644 --- a/tests/regex/wxregextest.cpp +++ b/tests/regex/wxregextest.cpp @@ -184,8 +184,6 @@ TEST_CASE("wxRegEx::ConvertFromBasic", "[regex][basic]") CHECK( wxRegEx::ConvertFromBasic("[^$\\)]") == "[^$\\)]" ); } -#ifdef wxHAS_REGEX_ADVANCED - TEST_CASE("wxRegEx::Unicode", "[regex][unicode]") { const wxString cyrillicCapitalA(L"\u0410"); @@ -198,6 +196,4 @@ TEST_CASE("wxRegEx::Unicode", "[regex][unicode]") CHECK( re.GetMatch(cyrillicSmallA) == cyrillicSmallA ); } -#endif // wxHAS_REGEX_ADVANCED - #endif // wxUSE_REGEX