Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1198)

Unified Diff: patches/regexcmp.patch

Issue 2442923002: ICU update to 58 part 2 (Closed)
Patch Set: apply more patches and updates; almost ready to roll Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/regex.patch ('k') | patches/relative_date.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patches/regexcmp.patch
diff --git a/patches/regexcmp.patch b/patches/regexcmp.patch
deleted file mode 100644
index 5f72732e64adc058071cebbbbafd0e3d14deb96a..0000000000000000000000000000000000000000
--- a/patches/regexcmp.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff --git a/source/i18n/regexcmp.cpp b/source/i18n/regexcmp.cpp
-index e518e84..d56dce3 100644
---- a/source/i18n/regexcmp.cpp
-+++ b/source/i18n/regexcmp.cpp
-@@ -71,6 +71,7 @@ RegexCompile::RegexCompile(RegexPattern *rxp, UErrorCode &status) :
- fMatchOpenParen = -1;
- fMatchCloseParen = -1;
- fCaptureName = NULL;
-+ fLastSetLiteral = U_SENTINEL;
-
- if (U_SUCCESS(status) && U_FAILURE(rxp->fDeferredStatus)) {
- status = rxp->fDeferredStatus;
-@@ -1752,12 +1753,14 @@ UBool RegexCompile::doParseActions(int32_t action)
- case doSetNamedRange:
- // We have scanned literal-\N{CHAR NAME}. Add the range to the set.
- // The left character is already in the set, and is saved in fLastSetLiteral.
-+ // Nonetheless, check if |fLastSetLiteral| is indeed set because it's
-+ // not set in some edge cases.
- // The right side needs to be picked up, the scan is at the 'N'.
- // Lower Limit > Upper limit being an error matches both Java
- // and ICU UnicodeSet behavior.
- {
- UChar32 c = scanNamedChar();
-- if (U_SUCCESS(*fStatus) && fLastSetLiteral > c) {
-+ if (U_SUCCESS(*fStatus) && (fLastSetLiteral == U_SENTINEL || fLastSetLiteral > c)) {
- error(U_REGEX_INVALID_RANGE);
- }
- UnicodeSet *s = (UnicodeSet *)fSetStack.peek();
-@@ -1822,11 +1825,13 @@ UBool RegexCompile::doParseActions(int32_t action)
- case doSetRange:
- // We have scanned literal-literal. Add the range to the set.
- // The left character is already in the set, and is saved in fLastSetLiteral.
-+ // Nonetheless, check if |fLastSetLiteral| is indeed set because it's
-+ // not set in some edge cases.
- // The right side is the current character.
- // Lower Limit > Upper limit being an error matches both Java
- // and ICU UnicodeSet behavior.
- {
-- if (fLastSetLiteral > fC.fChar) {
-+ if (fLastSetLiteral == U_SENTINEL || fLastSetLiteral > fC.fChar) {
- error(U_REGEX_INVALID_RANGE);
- }
- UnicodeSet *s = (UnicodeSet *)fSetStack.peek();
« no previous file with comments | « patches/regex.patch ('k') | patches/relative_date.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698