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

Unified Diff: source/i18n/ucln_in.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/i18n/ucln_in.c ('k') | source/i18n/ucol.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/ucln_in.cpp
diff --git a/source/i18n/ucln_in.c b/source/i18n/ucln_in.cpp
similarity index 75%
rename from source/i18n/ucln_in.c
rename to source/i18n/ucln_in.cpp
index cce5890d4527c6d65a5fe4fb50d29df9f89963e5..431d43161e760c860e7c0f9f32f8e1a938073086 100644
--- a/source/i18n/ucln_in.c
+++ b/source/i18n/ucln_in.cpp
@@ -1,11 +1,11 @@
/*
******************************************************************************
* *
-* Copyright (C) 2001-2009, International Business Machines *
+* Copyright (C) 2001-2014, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
-* file name: ucln_in.c
+* file name: ucln_in.cpp
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
@@ -16,6 +16,7 @@
#include "ucln.h"
#include "ucln_in.h"
+#include "mutex.h"
#include "uassert.h"
/** Auto-client for UCLN_I18N **/
@@ -29,7 +30,8 @@ static cleanupFunc *gCleanupFunctions[UCLN_I18N_COUNT];
static UBool i18n_cleanup(void)
{
- ECleanupI18NType libType = UCLN_I18N_START;
+ int32_t libType = UCLN_I18N_START;
+ (void)copyright; /* Suppress unused variable warning with clang. */
while (++libType<UCLN_I18N_COUNT) {
if (gCleanupFunctions[libType])
@@ -45,13 +47,14 @@ static UBool i18n_cleanup(void)
}
void ucln_i18n_registerCleanup(ECleanupI18NType type,
- cleanupFunc *func)
-{
+ cleanupFunc *func) {
U_ASSERT(UCLN_I18N_START < type && type < UCLN_I18N_COUNT);
- ucln_registerCleanup(UCLN_I18N, i18n_cleanup);
- if (UCLN_I18N_START < type && type < UCLN_I18N_COUNT)
{
- gCleanupFunctions[type] = func;
+ icu::Mutex m; // See ticket 10295 for discussion.
+ ucln_registerCleanup(UCLN_I18N, i18n_cleanup);
+ if (UCLN_I18N_START < type && type < UCLN_I18N_COUNT) {
+ gCleanupFunctions[type] = func;
+ }
}
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
ucln_registerAutomaticCleanup();
« no previous file with comments | « source/i18n/ucln_in.c ('k') | source/i18n/ucol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698