ICU-10365 fix namespace issue: icu::UInitOnce

X-SVN-Rev: 34252
This commit is contained in:
Markus Scherer 2013-09-10 00:34:12 +00:00
parent 86c481026c
commit 8f38199123
27 changed files with 50 additions and 52 deletions

View File

@ -33,7 +33,7 @@ U_NAMESPACE_BEGIN
static icu::Locale* availableLocaleList = NULL;
static int32_t availableLocaleListCount;
static UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
U_NAMESPACE_END
@ -100,7 +100,7 @@ static const char _kIndexTag[] = "InstalledLocales";
static char** _installedLocales = NULL;
static int32_t _installedLocalesCount = 0;
static UInitOnce _installedLocalesInitOnce;
static icu::UInitOnce _installedLocalesInitOnce;
/* ### Get available **************************************************/

View File

@ -458,10 +458,10 @@ static Norm2AllModes *nfkc_cfSingleton;
static Normalizer2 *noopSingleton;
static UHashtable *cache=NULL;
static UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
static UInitOnce nfkcInitOnce = U_INITONCE_INITIALIZER;
static UInitOnce nfkc_cfInitOnce = U_INITONCE_INITIALIZER;
static UInitOnce noopInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfkcInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfkc_cfInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce noopInitOnce = U_INITONCE_INITIALIZER;
// UInitOnce singleton initialization function
static void U_CALLCONV initSingletons(const char *what, UErrorCode &errorCode) {

View File

@ -1794,7 +1794,7 @@ U_NAMESPACE_END
static icu::UStack *gLanguageBreakFactories = NULL;
static icu::UInitOnce gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
/**
* Release all static memory held by breakiterator.

View File

@ -167,7 +167,7 @@ static UMutex cnvCacheMutex = U_MUTEX_INITIALIZER; /* Mutex for synchronizing c
static const char **gAvailableConverters = NULL;
static uint16_t gAvailableConverterCount = 0;
static UInitOnce gAvailableConvertersInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gAvailableConvertersInitOnce = U_INITONCE_INITIALIZER;
#if !U_CHARSET_IS_UTF8

View File

@ -175,7 +175,7 @@ static const char DATA_NAME[] = "cnvalias";
static const char DATA_TYPE[] = "icu";
static UDataMemory *gAliasData=NULL;
static UInitOnce gAliasDataInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gAliasDataInitOnce = U_INITONCE_INITIALIZER;
enum {
tocLengthIndex=0,

View File

@ -107,7 +107,7 @@ static UDataMemory *gCommonICUDataArray[10] = { NULL };
static UBool gHaveTriedToLoadCommonData = FALSE; /* See extendICUData(). */
static UHashtable *gCommonDataCache = NULL; /* Global hash table of opened ICU data files. */
static UInitOnce gCommonDataCacheInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gCommonDataCacheInitOnce = U_INITONCE_INITIALIZER;
static UDataFileAccess gDataFileAccess = UDATA_DEFAULT_ACCESS;

View File

@ -1,11 +1,9 @@
/*
******************************************************************************
* *
* Copyright (C) 2001-2013, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
* Copyright (C) 2001-2013, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* file name: uinit.c
* file name: uinit.cpp
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4

View File

@ -105,7 +105,7 @@ typedef struct {
static UDataMemory *uCharNamesData=NULL;
static UCharNames *uCharNames=NULL;
static UInitOnce gCharNamesInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gCharNamesInitOnce = U_INITONCE_INITIALIZER;
/*
* Maximum length of character names (regular & 1.0).

View File

@ -105,7 +105,7 @@ struct Inclusion {
static Inclusion gInclusions[UPROPS_SRC_COUNT]; // cached getInclusions()
static UnicodeSet *uni32Singleton;
static UInitOnce uni32InitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce uni32InitOnce = U_INITONCE_INITIALIZER;
//----------------------------------------------------------------
// Inclusions list

View File

@ -44,7 +44,7 @@ TODO: This cache should probably be removed when the deprecated code is
completely removed.
*/
static UHashtable *cache = NULL;
static UInitOnce gCacheInitOnce;
static icu::UInitOnce gCacheInitOnce;
static UMutex resbMutex = U_MUTEX_INITIALIZER;

View File

@ -42,7 +42,7 @@ U_CDECL_BEGIN
Static cache for already opened StringPrep profiles
*/
static UHashtable *SHARED_DATA_HASHTABLE = NULL;
static UInitOnce gSharedDataInitOnce;
static icu::UInitOnce gSharedDataInitOnce;
static UMutex usprepMutex = U_MUTEX_INITIALIZER;

View File

@ -131,7 +131,7 @@ void BuddhistCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& stat
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gBCInitOnce;
static icu::UInitOnce gBCInitOnce;
UBool BuddhistCalendar::haveDefaultCentury() const

View File

@ -838,7 +838,7 @@ ChineseCalendar::inDaylightTime(UErrorCode& status) const
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInitOnce = U_INITONCE_INITIALIZER;
UBool ChineseCalendar::haveDefaultCentury() const

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 2003 - 2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2003 - 2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -101,7 +101,7 @@ CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/)
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static void U_CALLCONV initializeSystemDefaultCentury() {

View File

@ -184,7 +184,7 @@ void DecimalFormatStaticSets::cleanup() { // Be sure to clean up newly added fie
}
static DecimalFormatStaticSets *gStaticSets;
static UInitOnce gStaticSetsInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gStaticSetsInitOnce = U_INITONCE_INITIALIZER;
//------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 2003 - 2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2003 - 2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -141,7 +141,7 @@ EthiopicCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static void U_CALLCONV initializeSystemDefaultCentury()
{

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 1997-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* File GREGOCAL.CPP
@ -1271,7 +1271,7 @@ GregorianCalendar::getType() const {
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool GregorianCalendar::haveDefaultCentury() const

View File

@ -675,7 +675,7 @@ HebrewCalendar::inDaylightTime(UErrorCode& status) const
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool HebrewCalendar::haveDefaultCentury() const
{

View File

@ -522,7 +522,7 @@ IslamicCalendar::inDaylightTime(UErrorCode& status) const
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool IslamicCalendar::haveDefaultCentury() const

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 1997-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* File NUMFMT.CPP

View File

@ -248,7 +248,7 @@ PersianCalendar::inDaylightTime(UErrorCode& status) const
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool PersianCalendar::haveDefaultCentury() const
{

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 2003-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2003-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* File TAIWNCAL.CPP
@ -138,7 +138,7 @@ void TaiwanCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& status
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
static UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool TaiwanCalendar::haveDefaultCentury() const
{

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 1997-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* File TIMEZONE.CPP

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 2011-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2011-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -136,10 +136,10 @@ static const int32_t ALL_GENERIC_NAME_TYPES = UTZGNM_LOCATION | UTZGNM_LONG | UT
// Time Zone ID/Short ID trie
static TextTrieMap *gZoneIdTrie = NULL;
static UInitOnce gZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
static TextTrieMap *gShortZoneIdTrie = NULL;
static UInitOnce gShortZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gShortZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
static UMutex gLock = U_MUTEX_INITIALIZER;

View File

@ -42,7 +42,7 @@
static const InverseUCATableHeader* _staticInvUCA = NULL;
static UDataMemory* invUCA_DATA_MEM = NULL;
static icu::UInitOnce gStaticInvUCAInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gStaticInvUCAInitOnce = U_INITONCE_INITIALIZER;
U_CDECL_BEGIN
static UBool U_CALLCONV

View File

@ -55,7 +55,7 @@ static void ucol_setReorderCodesFromParser(UCollator *coll, UColTokenParser *par
// static UCA. There is only one. Collators don't use it.
// It is referenced only in ucol_initUCA and ucol_cleanup
static UCollator* _staticUCA = NULL;
static UInitOnce gStaticUCAInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gStaticUCAInitOnce = U_INITONCE_INITIALIZER;
// static pointer to udata memory. Inited in ucol_initUCA
// used for cleanup in ucol_cleanup
static UDataMemory* UCA_DATA_MEM = NULL;

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
* Copyright (C) 2007-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2007-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -31,16 +31,16 @@ static UMutex gZoneMetaLock = U_MUTEX_INITIALIZER;
// CLDR Canonical ID mapping table
static UHashtable *gCanonicalIDCache = NULL;
static icu::UInitOnce gCanonicalIDCacheInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gCanonicalIDCacheInitOnce = U_INITONCE_INITIALIZER;
// Metazone mapping table
static UHashtable *gOlsonToMeta = NULL;
static icu::UInitOnce gOlsonToMetaInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gOlsonToMetaInitOnce = U_INITONCE_INITIALIZER;
// Available metazone IDs vector and table
static icu::UVector *gMetaZoneIDs = NULL;
static UHashtable *gMetaZoneIDTable = NULL;
static icu::UInitOnce gMetaZoneIDsInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gMetaZoneIDsInitOnce = U_INITONCE_INITIALIZER;
// Country info vectors
static icu::UVector *gSingleZoneCountries = NULL;