/**
*******************************************************************************
- * Copyright (C) 2002-2005, International Business Machines Corporation and *
- * others. All Rights Reserved. *
- *******************************************************************************
- *
+ * Copyright (C) 2002-2010, International Business Machines Corporation and
+ * others. All Rights Reserved.
*******************************************************************************
*/
#include "unicode/utypes.h"
#include "umutex.h"
// see LocaleUtility::getAvailableLocaleNames
-static Hashtable * LocaleUtility_cache = NULL;
+static U_NAMESPACE_QUALIFIER Hashtable * LocaleUtility_cache = NULL;
#define UNDERSCORE_CHAR ((UChar)0x005f)
#define AT_SIGN_CHAR ((UChar)64)
if (htp == NULL) {
htp = new Hashtable(status);
if (htp && U_SUCCESS(status)) {
- CharString cbundleID(bundleID);
- const char* path = (const char*) cbundleID;
- if (*path == 0) path = NULL; // empty string => NULL
+ CharString cbundleID;
+ cbundleID.appendInvariantChars(bundleID, status);
+ const char* path = cbundleID.isEmpty() ? NULL : cbundleID.data();
UEnumeration *uenum = ures_openAvailableLocales(path, &status);
for (;;) {
const UChar* id = uenum_unext(uenum, NULL, &status);