Drop WX_NO_REGEX_ADVANCED and always define wxHAS_REGEX_ADVANCED
Using non-PCRE system regex library, which was the only build variant when wxHAS_REGEX_ADVANCED was not defined, is not supported any more, so simplify the code by not testing for it.
This commit is contained in:
@@ -833,12 +833,6 @@
|
|||||||
*/
|
*/
|
||||||
#cmakedefine HAVE_BROKEN_LIBSTDCXX_VISIBILITY
|
#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
|
* 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.
|
* strlen on the search text affecting the performance of some operations.
|
||||||
|
@@ -201,7 +201,9 @@ Currently the following symbols exist:
|
|||||||
Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
|
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_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_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_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
|
||||||
@itemdef{wxHAS_WINDOW_LABEL_IN_STATIC_BOX, Defined if wxStaticBox::Create()
|
@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.}
|
overload taking @c wxWindow* instead of the text label is available on the current platform.}
|
||||||
|
@@ -53,13 +53,8 @@
|
|||||||
#undef wxHAS_CRASH_REPORT
|
#undef wxHAS_CRASH_REPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* wxRE_ADVANCED is not always available, depending on regex library used
|
/* wxRE_ADVANCED is always defined now and kept for compatibility only. */
|
||||||
* (it's unavailable only if compiling via configure against system library) */
|
#define wxHAS_REGEX_ADVANCED
|
||||||
#ifndef WX_NO_REGEX_ADVANCED
|
|
||||||
#define wxHAS_REGEX_ADVANCED
|
|
||||||
#else
|
|
||||||
#undef wxHAS_REGEX_ADVANCED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Pango-based ports and wxDFB use UTF-8 for text and font encodings
|
/* Pango-based ports and wxDFB use UTF-8 for text and font encodings
|
||||||
* internally and so their fonts can handle any encodings: */
|
* internally and so their fonts can handle any encodings: */
|
||||||
|
@@ -128,9 +128,6 @@
|
|||||||
#define PACKAGE_TARNAME "wxwidgets"
|
#define PACKAGE_TARNAME "wxwidgets"
|
||||||
#define PACKAGE_VERSION "3.1.6"
|
#define PACKAGE_VERSION "3.1.6"
|
||||||
|
|
||||||
// for regex
|
|
||||||
#define WX_NO_REGEX_ADVANCED 1
|
|
||||||
|
|
||||||
// for jpeg
|
// for jpeg
|
||||||
|
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
@@ -27,10 +27,8 @@ enum
|
|||||||
// use extended regex syntax
|
// use extended regex syntax
|
||||||
wxRE_EXTENDED = 0,
|
wxRE_EXTENDED = 0,
|
||||||
|
|
||||||
// use advanced RE syntax (built-in regex only)
|
// use advanced RE syntax (deprecated, same as wxRE_EXTENDED now)
|
||||||
#ifdef wxHAS_REGEX_ADVANCED
|
|
||||||
wxRE_ADVANCED = 1,
|
wxRE_ADVANCED = 1,
|
||||||
#endif
|
|
||||||
|
|
||||||
// use basic RE syntax
|
// use basic RE syntax
|
||||||
wxRE_BASIC = 2,
|
wxRE_BASIC = 2,
|
||||||
|
@@ -833,12 +833,6 @@
|
|||||||
*/
|
*/
|
||||||
#undef HAVE_BROKEN_LIBSTDCXX_VISIBILITY
|
#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
|
* 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.
|
* strlen on the search text affecting the performance of some operations.
|
||||||
|
@@ -901,12 +901,6 @@ typedef pid_t GPid;
|
|||||||
*/
|
*/
|
||||||
#undef HAVE_BROKEN_LIBSTDCXX_VISIBILITY
|
#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
|
* 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.
|
* strlen on the search text affecting the performance of some operations.
|
||||||
|
@@ -40,11 +40,6 @@
|
|||||||
#endif
|
#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 "wx/regex.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -347,10 +342,8 @@ void RegExTestCase::runTest()
|
|||||||
doTest(wxRE_BASIC);
|
doTest(wxRE_BASIC);
|
||||||
if (m_extended)
|
if (m_extended)
|
||||||
doTest(wxRE_EXTENDED);
|
doTest(wxRE_EXTENDED);
|
||||||
#ifdef wxHAS_REGEX_ADVANCED
|
|
||||||
if (m_advanced || (!m_basic && !m_extended))
|
if (m_advanced || (!m_basic && !m_extended))
|
||||||
doTest(wxRE_ADVANCED);
|
doTest(wxRE_ADVANCED);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try the test for a single flavour of expression
|
// Try the test for a single flavour of expression
|
||||||
@@ -492,6 +485,4 @@ CheckRE(
|
|||||||
#include "regex.inc"
|
#include "regex.inc"
|
||||||
|
|
||||||
|
|
||||||
#endif // wxHAS_REGEX_ADVANCED
|
|
||||||
|
|
||||||
#endif // wxUSE_REGEX
|
#endif // wxUSE_REGEX
|
||||||
|
@@ -184,8 +184,6 @@ TEST_CASE("wxRegEx::ConvertFromBasic", "[regex][basic]")
|
|||||||
CHECK( wxRegEx::ConvertFromBasic("[^$\\)]") == "[^$\\)]" );
|
CHECK( wxRegEx::ConvertFromBasic("[^$\\)]") == "[^$\\)]" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef wxHAS_REGEX_ADVANCED
|
|
||||||
|
|
||||||
TEST_CASE("wxRegEx::Unicode", "[regex][unicode]")
|
TEST_CASE("wxRegEx::Unicode", "[regex][unicode]")
|
||||||
{
|
{
|
||||||
const wxString cyrillicCapitalA(L"\u0410");
|
const wxString cyrillicCapitalA(L"\u0410");
|
||||||
@@ -198,6 +196,4 @@ TEST_CASE("wxRegEx::Unicode", "[regex][unicode]")
|
|||||||
CHECK( re.GetMatch(cyrillicSmallA) == cyrillicSmallA );
|
CHECK( re.GetMatch(cyrillicSmallA) == cyrillicSmallA );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxHAS_REGEX_ADVANCED
|
|
||||||
|
|
||||||
#endif // wxUSE_REGEX
|
#endif // wxUSE_REGEX
|
||||||
|
Reference in New Issue
Block a user