ICU-5304 Allow source code to work again without using U_NAMESPACE_USE
X-SVN-Rev: 20242
This commit is contained in:
parent
8b2c84620c
commit
4cc82b4180
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*****************************************************************
|
||||
* Copyright (c) 2002-2005, International Business Machines Corporation
|
||||
* Copyright (c) 2002-2006, International Business Machines Corporation
|
||||
* and others. All Rights Reserved.
|
||||
*****************************************************************
|
||||
* Date Name Description
|
||||
@ -39,7 +39,7 @@ U_CDECL_BEGIN
|
||||
*/
|
||||
static void U_CALLCONV
|
||||
_deleteTransliterator(void *obj) {
|
||||
delete (Transliterator*) obj;
|
||||
delete (U_NAMESPACE_QUALIFIER Transliterator*) obj;
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "uresimp.h"
|
||||
|
||||
#if !UCONFIG_NO_SERVICE
|
||||
static ICULocaleService* gService = NULL;
|
||||
static U_NAMESPACE_QUALIFIER ICULocaleService* gService = NULL;
|
||||
#endif
|
||||
|
||||
// INTERNAL - for cleanup
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2001-2005, International Business Machines
|
||||
* Copyright (C) 2001-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -30,6 +30,8 @@
|
||||
U_CFUNC UChar32 U_CALLCONV
|
||||
utrans_rep_caseContextIterator(void *context, int8_t dir)
|
||||
{
|
||||
U_NAMESPACE_USE
|
||||
|
||||
UCaseContext *csc=(UCaseContext *)context;
|
||||
Replaceable *rep=(Replaceable *)csc->p;
|
||||
UChar32 c;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 1996-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*/
|
||||
@ -54,7 +54,7 @@ U_NAMESPACE_BEGIN
|
||||
#if !UCONFIG_NO_SERVICE
|
||||
U_NAMESPACE_END
|
||||
|
||||
static ICULocaleService* gService = NULL;
|
||||
static U_NAMESPACE_QUALIFIER ICULocaleService* gService = NULL;
|
||||
/**
|
||||
* Release all static memory held by collator.
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define DELETE_ARRAY(array) uprv_free((void *) (array))
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static CharsetRecognizer **fCSRecognizers = NULL;
|
||||
static U_NAMESPACE_QUALIFIER CharsetRecognizer **fCSRecognizers = NULL;
|
||||
|
||||
static int32_t fCSRecognizers_size = 0;
|
||||
|
||||
@ -56,6 +56,8 @@ static UBool U_CALLCONV csdet_cleanup(void)
|
||||
static int32_t U_CALLCONV
|
||||
charsetMatchComparator(const void *context, const void *left, const void *right)
|
||||
{
|
||||
U_NAMESPACE_USE
|
||||
|
||||
const CharsetMatch **csm_l = (const CharsetMatch **) left;
|
||||
const CharsetMatch **csm_r = (const CharsetMatch **) right;
|
||||
|
||||
@ -367,6 +369,8 @@ static const UEnumeration gCSDetEnumeration = {
|
||||
U_CAPI UEnumeration * U_EXPORT2
|
||||
ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status)
|
||||
{
|
||||
U_NAMESPACE_USE
|
||||
|
||||
if(U_FAILURE(*status)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ static const int32_t LEAP_MONTH_START[][3] = {
|
||||
{ 383, 384, 385 }, // Elul
|
||||
};
|
||||
|
||||
static CalendarCache *gCache = NULL;
|
||||
static U_NAMESPACE_QUALIFIER CalendarCache *gCache = NULL;
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static UBool calendar_hebrew_cleanup(void) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2004, International Business Machines Corporation
|
||||
* Copyright (C) 2003-2006, International Business Machines Corporation
|
||||
* and others. All Rights Reserved.
|
||||
******************************************************************************
|
||||
*
|
||||
@ -51,8 +51,8 @@ static void debug_islamcal_msg(const char *pat, ...)
|
||||
// --- The cache --
|
||||
// cache of months
|
||||
static UMTX astroLock = 0; // pod bay door lock
|
||||
static CalendarCache *gMonthCache = NULL;
|
||||
static CalendarAstronomer *gIslamicCalendarAstro = NULL;
|
||||
static U_NAMESPACE_QUALIFIER CalendarCache *gMonthCache = NULL;
|
||||
static U_NAMESPACE_QUALIFIER CalendarAstronomer *gIslamicCalendarAstro = NULL;
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static UBool calendar_islamic_cleanup(void) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1997-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 1997-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
@ -131,12 +131,12 @@ static const UChar * const DATE_STYLE_IDS[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const DateFormat::EStyle DATE_STYLES[] = {
|
||||
DateFormat::kDefault,
|
||||
DateFormat::kShort,
|
||||
DateFormat::kMedium,
|
||||
DateFormat::kLong,
|
||||
DateFormat::kFull,
|
||||
static const U_NAMESPACE_QUALIFIER DateFormat::EStyle DATE_STYLES[] = {
|
||||
U_NAMESPACE_QUALIFIER DateFormat::kDefault,
|
||||
U_NAMESPACE_QUALIFIER DateFormat::kShort,
|
||||
U_NAMESPACE_QUALIFIER DateFormat::kMedium,
|
||||
U_NAMESPACE_QUALIFIER DateFormat::kLong,
|
||||
U_NAMESPACE_QUALIFIER DateFormat::kFull,
|
||||
};
|
||||
|
||||
static const int32_t DEFAULT_INITIAL_CAPACITY = 10;
|
||||
|
@ -1574,6 +1574,8 @@ U_NAMESPACE_END
|
||||
|
||||
U_CAPI int32_t
|
||||
utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorCode *status) {
|
||||
U_NAMESPACE_USE
|
||||
|
||||
//const UChar *sourceStart = source;
|
||||
const UChar *targetStart = target;
|
||||
const UChar *sourceLimit = source+sourceLen;
|
||||
|
@ -396,7 +396,7 @@ U_CAPI int32_t U_EXPORT2
|
||||
ucol_keyHashCode(const uint8_t *key,
|
||||
int32_t length)
|
||||
{
|
||||
CollationKey newKey(key, length);
|
||||
U_NAMESPACE_QUALIFIER CollationKey newKey(key, length);
|
||||
return newKey.hashCode();
|
||||
}
|
||||
|
||||
|
@ -98,12 +98,12 @@ static const UChar CUSTOM_ID[] =
|
||||
0x43, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x00 /* "Custom" */
|
||||
};
|
||||
|
||||
static UMTX LOCK;
|
||||
static TimeZone* DEFAULT_ZONE = NULL;
|
||||
static TimeZone* _GMT = NULL; // cf. TimeZone::GMT
|
||||
static UMTX LOCK;
|
||||
static U_NAMESPACE_QUALIFIER TimeZone* DEFAULT_ZONE = NULL;
|
||||
static U_NAMESPACE_QUALIFIER TimeZone* _GMT = NULL; // cf. TimeZone::GMT
|
||||
|
||||
#ifdef U_USE_TIMEZONE_OBSOLETE_2_8
|
||||
static UnicodeString* OLSON_IDS = 0;
|
||||
static U_NAMESPACE_QUALIFIER UnicodeString* OLSON_IDS = 0;
|
||||
#endif
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
@ -90,7 +90,7 @@ static UMTX registryMutex = 0;
|
||||
/**
|
||||
* System transliterator registry; non-null when initialized.
|
||||
*/
|
||||
static TransliteratorRegistry* registry = 0;
|
||||
static U_NAMESPACE_QUALIFIER TransliteratorRegistry* registry = 0;
|
||||
|
||||
// Macro to check/initialize the registry. ONLY USE WITHIN
|
||||
// MUTEX. Avoids function call when registry is initialized.
|
||||
@ -1569,6 +1569,7 @@ U_NAMESPACE_END
|
||||
* user, because RBTs hold pointers to common data objects.
|
||||
*/
|
||||
U_CFUNC UBool transliterator_cleanup(void) {
|
||||
U_NAMESPACE_USE
|
||||
TransliteratorIDParser::cleanup();
|
||||
if (registry) {
|
||||
delete registry;
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
#include "cmemory.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
|
||||
|
||||
#define NEW_ARRAY(type,count) (type *) uprv_malloc((count) * sizeof(type))
|
||||
|
Loading…
Reference in New Issue
Block a user