From 9218fa1062d3982992970aab461ab6f51e2ae88d Mon Sep 17 00:00:00 2001 From: freekeeperlzt Date: Fri, 2 Dec 2022 10:43:46 +0800 Subject: [PATCH] fix some bug --- Makefile | 2 +- re2/filtered_re2.cc | 4 +--- re2/re2.cc | 4 +--- re2/regex_internal.h | 3 --- re2/set.cc | 5 +++-- re2/stringpiece.cc | 3 +-- re2/testing/re2_test.cc | 4 +--- re2/testing/regexp_benchmark.cc | 9 +-------- re2/testing/util/benchmark.cc | 1 - regex-capi/ctest/test.c | 2 +- 10 files changed, 10 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 9a748a8..12f1fb2 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ obj/so/test/%: obj/so/libre2.$(SOEXT) obj/libre2.a obj/re2/testing/%.o $(TESTOFI # Filter out dump.o because testing::TempDir() isn't available for it. obj/test/regexp_benchmark: obj/libre2.a obj/re2/testing/regexp_benchmark.o $(TESTOFILES) obj/re2/testing/util/benchmark.o @mkdir -p obj/test - $(CXX) -o $@ obj/re2/testing/regexp_benchmark.o $(filter-out obj/re2/testing/dump.o, $(TESTOFILES)) obj/re2/testing/util/benchmark.o obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS) + $(CXX) -o $@ obj/re2/testing/regexp_benchmark.o $(filter-out obj/re2/testing/dump.o, $(TESTOFILES)) obj/re2/testing/util/benchmark.o obj/libre2.a target/release/libcapi.a $(RE2_LDFLAGS) $(LDFLAGS) ifdef REBUILD_TABLES .PRECIOUS: re2/perl_groups.cc diff --git a/re2/filtered_re2.cc b/re2/filtered_re2.cc index e9dfc54..1e1cac5 100644 --- a/re2/filtered_re2.cc +++ b/re2/filtered_re2.cc @@ -15,14 +15,13 @@ #include #include #include -#include "re2/filtered_re2.h" #include #include #include #include "re2/testing/util/util.h" #include "re2/testing/util/logging.h" -// #include "re2/prefilter.h" +#include "re2/filtered_re2.h" extern "C" { #include "regex-capi/include/regex_capi.h" @@ -33,7 +32,6 @@ namespace re2 std::map> map_atoms; - // #include "re2/prefilter_tree.h" class PrefilterTree { public: diff --git a/re2/re2.cc b/re2/re2.cc index 4bf66bc..ef4c5d7 100644 --- a/re2/re2.cc +++ b/re2/re2.cc @@ -13,7 +13,6 @@ * Description: Interface implementation in re2.h. ******************************************************************************/ -#include "re2/re2.h" #include #include #include @@ -34,8 +33,7 @@ #include "re2/testing/util/util.h" #include "re2/testing/util/logging.h" -// #include "util/strutil.h" -// #include "util/utf.h" +#include "re2/re2.h" #include "regex_internal.h" using namespace std; diff --git a/re2/regex_internal.h b/re2/regex_internal.h index cab67fe..ba7968d 100644 --- a/re2/regex_internal.h +++ b/re2/regex_internal.h @@ -13,16 +13,13 @@ * Description: . ******************************************************************************/ -// #include "re2/sparse_array.h" #include "regex-capi/include/regex_capi.h" namespace re2 { -// #include "re2/prog.h" // Compiled form of regexp program. class Prog { //rure 更名为 Prog }; -// #include "re2/regexp.h" class Regexp { public: diff --git a/re2/set.cc b/re2/set.cc index 28d3be8..e764718 100644 --- a/re2/set.cc +++ b/re2/set.cc @@ -13,7 +13,7 @@ * Description: Interface implementation in set.h. ******************************************************************************/ -#include "re2/set.h" + #include #include @@ -25,8 +25,9 @@ #include "re2/testing/util/util.h" #include "re2/testing/util/logging.h" #include "re2/re2.h" -#include "regex_internal.h" +#include "re2/set.h" #include "re2/stringpiece.h" +#include "regex_internal.h" #include "regex-capi/include/regex_capi.h" using namespace std; diff --git a/re2/stringpiece.cc b/re2/stringpiece.cc index ea822d2..5f22946 100644 --- a/re2/stringpiece.cc +++ b/re2/stringpiece.cc @@ -2,10 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -#include "re2/stringpiece.h" - #include +#include "re2/stringpiece.h" #include "re2/testing/util/util.h" namespace re2 { diff --git a/re2/testing/re2_test.cc b/re2/testing/re2_test.cc index 80aa5b6..5d22f95 100644 --- a/re2/testing/re2_test.cc +++ b/re2/testing/re2_test.cc @@ -22,9 +22,7 @@ #include "re2/testing/util/logging.h" #include "re2/testing/util/strutil.h" #include "re2/re2.h" -/*被注释掉的 -#include "re2/regexp.h" -*/ + namespace re2 { TEST(RE2, HexTests) { diff --git a/re2/testing/regexp_benchmark.cc b/re2/testing/regexp_benchmark.cc index d2b8c1d..90c7202 100644 --- a/re2/testing/regexp_benchmark.cc +++ b/re2/testing/regexp_benchmark.cc @@ -18,20 +18,13 @@ #include "re2/testing/util/benchmark.h" #include "re2/testing/util/test.h" -// #include "util/flags.h" #include "re2/testing/util/logging.h" -// #include "util/malloc_counter.h" -// #include "util/strutil.h" -// #include "re2/prog.h" #include "re2/re2.h" #include "re2/set.h" -// #include "re2/regexp.h" -// #include "util/mutex.h" -// #include "util/pcre.h" extern "C" { -#include +#include "regex-capi/include/regex_capi.h" } namespace re2 { diff --git a/re2/testing/util/benchmark.cc b/re2/testing/util/benchmark.cc index 0545c9b..d3398b5 100644 --- a/re2/testing/util/benchmark.cc +++ b/re2/testing/util/benchmark.cc @@ -9,7 +9,6 @@ #include #include "re2/testing/util/benchmark.h" -// #include "util/flags.h" #include "re2/re2.h" #ifdef _WIN32 diff --git a/regex-capi/ctest/test.c b/regex-capi/ctest/test.c index 295e9ca..9505464 100644 --- a/regex-capi/ctest/test.c +++ b/regex-capi/ctest/test.c @@ -4,7 +4,7 @@ #include #include -#include "regex_capi.h" +#include "regex-capi/include/regex_capi.h" #ifndef DEBUG #define DEBUG false -- Gitee