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

Unified Diff: source/common/ucnv_u7.c

Issue 2440913002: Update ICU to 58.1
Patch Set: 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 | « source/common/ucnv_u32.c ('k') | source/common/ucnv_u8.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/ucnv_u7.c
diff --git a/source/common/ucnv_u7.c b/source/common/ucnv_u7.c
index d35bae2160607c1a6847070002f8837100b83437..c3b4d74b9a914959b9e8cf85276c409170f26267 100644
--- a/source/common/ucnv_u7.c
+++ b/source/common/ucnv_u7.c
@@ -1,6 +1,8 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (C) 2002-2015, International Business Machines
+* Copyright (C) 2002-2016, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_u7.c
@@ -18,6 +20,7 @@
#if !UCONFIG_NO_CONVERSION && !UCONFIG_ONLY_HTML_CONVERSION
+#include "cmemory.h"
#include "unicode/ucnv.h"
#include "ucnv_bld.h"
#include "ucnv_cnv.h"
@@ -487,7 +490,7 @@ _UTF7FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
inDirectMode=(UBool)((status>>24)&1);
base64Counter=(int8_t)(status>>16);
bits=(uint8_t)status;
- U_ASSERT(bits<=sizeof(toBase64)/sizeof(toBase64[0]));
+ U_ASSERT(bits<=UPRV_LENGTHOF(toBase64));
}
/* UTF-7 always encodes UTF-16 code units, therefore we need only a simple sourceIndex */
@@ -759,7 +762,10 @@ static const UConverterImpl _UTF7Impl={
_UTF7GetName,
NULL, /* we don't need writeSub() because we never call a callback at fromUnicode() */
NULL,
- ucnv_getCompleteUnicodeSet
+ ucnv_getCompleteUnicodeSet,
+
+ NULL,
+ NULL
};
static const UConverterStaticData _UTF7StaticData={
« no previous file with comments | « source/common/ucnv_u32.c ('k') | source/common/ucnv_u8.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698