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

Unified Diff: icu52/patches/utext.patch

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 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 | « icu52/patches/unihan.patch ('k') | icu52/patches/vs2012.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu52/patches/utext.patch
===================================================================
--- icu52/patches/utext.patch (revision 261498)
+++ icu52/patches/utext.patch (working copy)
@@ -1,76 +0,0 @@
-Index: test/cintltst/utexttst.c
-===================================================================
---- test/cintltst/utexttst.c (revision 29355)
-+++ test/cintltst/utexttst.c (revision 29356)
-@@ -1,6 +1,6 @@
- /********************************************************************
- * COPYRIGHT:
-- * Copyright (c) 2005-2009, International Business Machines Corporation and
-+ * Copyright (c) 2005-2011, International Business Machines Corporation and
- * others. All Rights Reserved.
- ********************************************************************/
- /*
-@@ -210,6 +210,10 @@
- UChar uString[] = {0x41, 0x42, 0x43, 0};
- UChar buf[100];
- int32_t i;
-+ /* Test pinning of input bounds */
-+ UChar uString2[] = {0x41, 0x42, 0x43, 0x44, 0x45,
-+ 0x46, 0x47, 0x48, 0x49, 0x4A, 0};
-+ UChar * uString2Ptr = uString2 + 5;
-
- status = U_ZERO_ERROR;
- uta = utext_openUChars(NULL, uString, -1, &status);
-@@ -228,6 +232,20 @@
- i = u_strcmp(uString, buf);
- TEST_ASSERT(i == 0);
- utext_close(uta);
-+
-+ /* Test pinning of input bounds */
-+ status = U_ZERO_ERROR;
-+ uta = utext_openUChars(NULL, uString2Ptr, -1, &status);
-+ TEST_SUCCESS(status);
-+
-+ status = U_ZERO_ERROR;
-+ memset(buf, 0, sizeof(buf));
-+ i = utext_extract(uta, -3, 20, buf, 100, &status);
-+ TEST_SUCCESS(status);
-+ TEST_ASSERT(i == u_strlen(uString2Ptr));
-+ i = u_strcmp(uString2Ptr, buf);
-+ TEST_ASSERT(i == 0);
-+ utext_close(uta);
- }
-
- {
-Index: common/utext.cpp
-===================================================================
---- common/utext.cpp (revision 29355)
-+++ common/utext.cpp (revision 29356)
-@@ -1,7 +1,7 @@
- /*
- *******************************************************************************
- *
--* Copyright (C) 2005-2010, International Business Machines
-+* Copyright (C) 2005-2011, International Business Machines
- * Corporation and others. All Rights Reserved.
- *
- *******************************************************************************
-@@ -2846,7 +2846,6 @@
- return 0;
- }
-
-- const UChar *s=(const UChar *)ut->context;
- int32_t si, di;
-
- int32_t start32;
-@@ -2856,8 +2855,8 @@
- // Pins 'start' to the length of the string, if it came in out-of-bounds.
- // Snaps 'start' to the beginning of a code point.
- ucstrTextAccess(ut, start, TRUE);
-- U_ASSERT(start <= INT32_MAX);
-- start32 = (int32_t)start;
-+ const UChar *s=ut->chunkContents;
-+ start32 = ut->chunkOffset;
-
- int32_t strLength=(int32_t)ut->a;
- if (strLength >= 0) {
« no previous file with comments | « icu52/patches/unihan.patch ('k') | icu52/patches/vs2012.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698