mirror of
https://github.com/boostorg/regex.git
synced 2025-08-01 13:34:38 +02:00
Merge pull request #172 from boostorg/no_cache_fix
Fix for building with BOOST_REGEX_MAX_CACHE_BLOCKS=0.
This commit is contained in:
51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
@@ -205,7 +205,7 @@ jobs:
|
|||||||
run: ..\..\..\b2 --hash %ARGS%
|
run: ..\..\..\b2 --hash %ARGS%
|
||||||
working-directory: ../boost-root/libs/regex/test
|
working-directory: ../boost-root/libs/regex/test
|
||||||
windows_msvc_14_0:
|
windows_msvc_14_0:
|
||||||
runs-on: windows-latest
|
runs-on: windows-2019
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
@@ -252,7 +252,7 @@ jobs:
|
|||||||
run: ..\..\..\b2 --hash %ARGS%
|
run: ..\..\..\b2 --hash %ARGS%
|
||||||
working-directory: ../boost-root/libs/regex/test
|
working-directory: ../boost-root/libs/regex/test
|
||||||
windows_msvc_14_2:
|
windows_msvc_14_2:
|
||||||
runs-on: windows-latest
|
runs-on: windows-2019
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
@@ -298,6 +298,53 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: ..\..\..\b2 --hash %ARGS%
|
run: ..\..\..\b2 --hash %ARGS%
|
||||||
working-directory: ../boost-root/libs/regex/test
|
working-directory: ../boost-root/libs/regex/test
|
||||||
|
windows_msvc_14_3:
|
||||||
|
runs-on: windows-2022
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: cmd
|
||||||
|
env:
|
||||||
|
ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
toolset: [ msvc-14.3 ]
|
||||||
|
standard: [ 14, 17, 20, latest ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
- uses: mstachniuk/ci-skip@v1
|
||||||
|
with:
|
||||||
|
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
|
||||||
|
commit-filter-separator: ';'
|
||||||
|
fail-fast: true
|
||||||
|
- name: Checkout main boost
|
||||||
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||||
|
- name: Update tools/boostdep
|
||||||
|
run: git submodule update --init tools/boostdep
|
||||||
|
working-directory: ../boost-root
|
||||||
|
- name: Copy files
|
||||||
|
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\regex
|
||||||
|
working-directory: ../boost-root
|
||||||
|
- name: Install deps
|
||||||
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
||||||
|
working-directory: ../boost-root
|
||||||
|
- name: Bootstrap
|
||||||
|
run: bootstrap
|
||||||
|
working-directory: ../boost-root
|
||||||
|
- name: Generate headers
|
||||||
|
run: b2 headers
|
||||||
|
working-directory: ../boost-root
|
||||||
|
- name: Config info install
|
||||||
|
run: ..\..\..\b2 config_info_travis_install %ARGS%
|
||||||
|
working-directory: ../boost-root/libs/config/test
|
||||||
|
- name: Config info
|
||||||
|
run: config_info_travis
|
||||||
|
working-directory: ../boost-root/libs/config/test
|
||||||
|
- name: Test
|
||||||
|
run: ..\..\..\b2 --hash %ARGS%
|
||||||
|
working-directory: ../boost-root/libs/regex/test
|
||||||
ubuntu-cmake-install:
|
ubuntu-cmake-install:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
namespace boost{
|
namespace boost{
|
||||||
namespace BOOST_REGEX_DETAIL_NS{
|
namespace BOOST_REGEX_DETAIL_NS{
|
||||||
|
|
||||||
|
#if BOOST_REGEX_MAX_CACHE_BLOCKS != 0
|
||||||
#ifdef BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE /* lock free implementation */
|
#ifdef BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE /* lock free implementation */
|
||||||
struct mem_block_cache
|
struct mem_block_cache
|
||||||
{
|
{
|
||||||
@@ -138,6 +139,7 @@ struct mem_block_cache
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
|
#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
|
||||||
|
|
||||||
|
@@ -94,6 +94,15 @@ test-suite regex
|
|||||||
<define>TEST_THREADS
|
<define>TEST_THREADS
|
||||||
: regex_regress_threaded ]
|
: regex_regress_threaded ]
|
||||||
|
|
||||||
|
[ run regress/$(R_SOURCE) ../build//boost_regex
|
||||||
|
../../thread/build//boost_thread ../build//icu_options
|
||||||
|
: # command line
|
||||||
|
: # input files
|
||||||
|
: # requirements
|
||||||
|
<define>TEST_THREADS
|
||||||
|
<define>BOOST_REGEX_MAX_CACHE_BLOCKS=0
|
||||||
|
: regex_regress_threaded_no_cache ]
|
||||||
|
|
||||||
[ regex-test posix_api_check : c_compiler_checks/posix_api_check.c ]
|
[ regex-test posix_api_check : c_compiler_checks/posix_api_check.c ]
|
||||||
|
|
||||||
[ compile c_compiler_checks/wide_posix_api_check.c
|
[ compile c_compiler_checks/wide_posix_api_check.c
|
||||||
|
@@ -170,19 +170,19 @@ void test_sets2()
|
|||||||
TEST_INVALID_REGEX("[[.NUL.]", perl);
|
TEST_INVALID_REGEX("[[.NUL.]", perl);
|
||||||
TEST_INVALID_REGEX("[[:<:]z]", perl);
|
TEST_INVALID_REGEX("[[:<:]z]", perl);
|
||||||
TEST_INVALID_REGEX("[a[:>:]]", perl);
|
TEST_INVALID_REGEX("[a[:>:]]", perl);
|
||||||
TEST_REGEX_SEARCH("[[.A.]]", boost::regex::extended|icase, "A", match_default, make_array(0, 1, -2, -2));
|
TEST_REGEX_SEARCH("[[.A.]]", extended|icase, "A", match_default, make_array(0, 1, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.A.]]", boost::regex::extended|icase, "a", match_default, make_array(0, 1, -2, -2));
|
TEST_REGEX_SEARCH("[[.A.]]", extended|icase, "a", match_default, make_array(0, 1, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.A.]-b]+", boost::regex::extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
TEST_REGEX_SEARCH("[[.A.]-b]+", extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[A-[.b.]]+", boost::regex::extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
TEST_REGEX_SEARCH("[A-[.b.]]+", extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.a.]-B]+", boost::regex::extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
TEST_REGEX_SEARCH("[[.a.]-B]+", extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[a-[.B.]]+", boost::regex::extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
TEST_REGEX_SEARCH("[a-[.B.]]+", extended|icase, "AaBb", match_default, make_array(0, 4, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[\x61]", boost::regex::extended, "a", match_default, make_array(0, 1, -2, -2));
|
TEST_REGEX_SEARCH("[\x61]", extended, "a", match_default, make_array(0, 1, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[\x61-c]+", boost::regex::extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
TEST_REGEX_SEARCH("[\x61-c]+", extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[a-\x63]+", boost::regex::extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
TEST_REGEX_SEARCH("[a-\x63]+", extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.a.]-c]+", boost::regex::extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
TEST_REGEX_SEARCH("[[.a.]-c]+", extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[a-[.c.]]+", boost::regex::extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
TEST_REGEX_SEARCH("[a-[.c.]]+", extended, "abcd", match_default, make_array(0, 3, -2, -2));
|
||||||
TEST_INVALID_REGEX("[[:alpha:]-a]", boost::regex::extended);
|
TEST_INVALID_REGEX("[[:alpha:]-a]", extended);
|
||||||
TEST_INVALID_REGEX("[a-[:alpha:]]", boost::regex::extended);
|
TEST_INVALID_REGEX("[a-[:alpha:]]", extended);
|
||||||
TEST_REGEX_SEARCH("[[.ae.]]", basic, "ae", match_default, make_array(0, 2, -2, -2));
|
TEST_REGEX_SEARCH("[[.ae.]]", basic, "ae", match_default, make_array(0, 2, -2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.ae.]]", basic, "aE", match_default, make_array(-2, -2));
|
TEST_REGEX_SEARCH("[[.ae.]]", basic, "aE", match_default, make_array(-2, -2));
|
||||||
TEST_REGEX_SEARCH("[[.AE.]]", basic, "AE", match_default, make_array(0, 2, -2, -2));
|
TEST_REGEX_SEARCH("[[.AE.]]", basic, "AE", match_default, make_array(0, 2, -2, -2));
|
||||||
|
Reference in New Issue
Block a user