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

Unified Diff: source/io/ucln_io.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/io/ucln_io.c ('k') | source/io/ufile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/io/ucln_io.cpp
diff --git a/source/io/ucln_io.c b/source/io/ucln_io.cpp
similarity index 77%
rename from source/io/ucln_io.c
rename to source/io/ucln_io.cpp
index 041f4e737efbc41cb6d85b6400e5b0ed3065b0ff..1775d5c509435370e087daaaacb466ec19c36949 100644
--- a/source/io/ucln_io.c
+++ b/source/io/ucln_io.cpp
@@ -1,11 +1,11 @@
/*
******************************************************************************
* *
-* Copyright (C) 2001-2013, International Business Machines *
+* Copyright (C) 2001-2014, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
-* file name: ucln_io.c
+* file name: ucln_io.cpp
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
@@ -14,6 +14,7 @@
* created by: George Rhoten
*/
+#include "mutex.h"
#include "ucln.h"
#include "ucln_io.h"
#include "uassert.h"
@@ -34,8 +35,9 @@ static cleanupFunc *gCleanupFunctions[UCLN_IO_COUNT];
static UBool io_cleanup(void)
{
- ECleanupIOType libType = UCLN_IO_START;
+ int32_t libType = UCLN_IO_START;
+ (void)copyright; // Suppress unused variable warning.
while (++libType<UCLN_IO_COUNT) {
if (gCleanupFunctions[libType])
{
@@ -50,13 +52,14 @@ static UBool io_cleanup(void)
}
void ucln_io_registerCleanup(ECleanupIOType type,
- cleanupFunc *func)
-{
+ cleanupFunc *func) {
U_ASSERT(UCLN_IO_START < type && type < UCLN_IO_COUNT);
- ucln_registerCleanup(UCLN_IO, io_cleanup);
- if (UCLN_IO_START < type && type < UCLN_IO_COUNT)
{
- gCleanupFunctions[type] = func;
+ icu::Mutex m; // See ticket 10295 for discussion.
+ ucln_registerCleanup(UCLN_IO, io_cleanup);
+ if (UCLN_IO_START < type && type < UCLN_IO_COUNT) {
+ gCleanupFunctions[type] = func;
+ }
}
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
« no previous file with comments | « source/io/ucln_io.c ('k') | source/io/ufile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698