upgpkg: ocaml-topkg 1.0.5-2
[arch-packages.git] / libfbclient / trunk / update-re2.patch
blob9bb24b35137e42727209444a252b43eff5fc0d5a
1 commit 512319738fcf9819f375f20441f09a7b1dff5168
2 Author: Adriano dos Santos Fernandes <adrianosf@gmail.com>
3 Date: Wed May 26 10:41:25 2021 -0300
5 Replace removed RE2 method.
7 diff --git a/src/common/SimilarToRegex.cpp b/src/common/SimilarToRegex.cpp
8 index 3a62b245e3..0b6e533018 100644
9 --- a/src/common/SimilarToRegex.cpp
10 +++ b/src/common/SimilarToRegex.cpp
11 @@ -108,7 +108,7 @@ namespace
12 options.set_log_errors(false);
13 options.set_dot_nl(true);
14 options.set_case_sensitive(!(flags & COMP_FLAG_CASE_INSENSITIVE));
15 - options.set_utf8(!(flags & COMP_FLAG_LATIN));
16 + options.set_encoding(flags & COMP_FLAG_LATIN ? RE2::Options::EncodingLatin1 : RE2::Options::EncodingUTF8);
18 re2::StringPiece sp((const char*) re2PatternStr.c_str(), re2PatternStr.length());
19 regexp = FB_NEW_POOL(pool) RE2(sp, options);
20 @@ -759,7 +759,7 @@ namespace
21 options.set_log_errors(false);
22 options.set_dot_nl(true);
23 options.set_case_sensitive(!(flags & COMP_FLAG_CASE_INSENSITIVE));
24 - options.set_utf8(!(flags & COMP_FLAG_LATIN));
25 + options.set_encoding(flags & COMP_FLAG_LATIN ? RE2::Options::EncodingLatin1 : RE2::Options::EncodingUTF8);
27 re2::StringPiece sp((const char*) finalRe2Pattern.c_str(), finalRe2Pattern.length());
28 regexp = FB_NEW_POOL(pool) RE2(sp, options);