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

Unified Diff: source/common/utrie2_builder.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 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 | « source/common/utrie2.cpp ('k') | source/common/uts46.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/utrie2_builder.cpp
diff --git a/source/common/utrie2_builder.cpp b/source/common/utrie2_builder.cpp
index 8d2a4e12ecb41d9e57a9569dc6d3bbd13bb74b69..0815822c5035f708e26e23848de8d1103b177124 100644
--- a/source/common/utrie2_builder.cpp
+++ b/source/common/utrie2_builder.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -33,8 +33,6 @@
#include "utrie.h" /* for utrie2_fromUTrie() and utrie_swap() */
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
/* Implementation notes ----------------------------------------------------- */
/*
@@ -476,7 +474,7 @@ allocIndex2Block(UNewTrie2 *trie) {
newBlock=trie->index2Length;
newTop=newBlock+UTRIE2_INDEX_2_BLOCK_LENGTH;
- if(newTop>LENGTHOF(trie->index2)) {
+ if(newTop>UPRV_LENGTHOF(trie->index2)) {
/*
* Should never occur.
* Either UTRIE2_MAX_BUILD_TIME_INDEX_LENGTH is incorrect,
@@ -1417,35 +1415,6 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
trie->newTrie=NULL;
}
-U_CAPI UBool U_EXPORT2
-utrie2_isFrozen(const UTrie2 *trie) {
- return (UBool)(trie->newTrie==NULL);
-}
-
-U_CAPI int32_t U_EXPORT2
-utrie2_serialize(UTrie2 *trie,
- void *data, int32_t capacity,
- UErrorCode *pErrorCode) {
- /* argument check */
- if(U_FAILURE(*pErrorCode)) {
- return 0;
- }
-
- if( trie==NULL || trie->memory==NULL || trie->newTrie!=NULL ||
- capacity<0 || (capacity>0 && (data==NULL || (U_POINTER_MASK_LSB(data, 3)!=0)))
- ) {
- *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return 0;
- }
-
- if(capacity>=trie->length) {
- uprv_memcpy(data, trie->memory, trie->length);
- } else {
- *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
- }
- return trie->length;
-}
-
/*
* This is here to avoid a dependency from utrie2.cpp on utrie.c.
* This file already depends on utrie.c.
« no previous file with comments | « source/common/utrie2.cpp ('k') | source/common/uts46.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698