]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/io/locbund.cpp
ICU-64252.0.1.tar.gz
[apple/icu.git] / icuSources / io / locbund.cpp
index 594ecc3b02ff6d93843cb16cbd56a10a21ee0d35..4b6fe34c29e8cfa75ceb877dd40d246b5479aa03 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *
@@ -43,10 +45,10 @@ static UBool U_CALLCONV locbund_cleanup(void) {
 }
 U_CDECL_END
 
-static UMutex gLock = U_MUTEX_INITIALIZER;
 static inline UNumberFormat * copyInvariantFormatter(ULocaleBundle *result, UNumberFormatStyle style) {
     U_NAMESPACE_USE
-    Mutex lock(&gLock);
+    static UMutex *gLock = STATIC_NEW(UMutex);
+    Mutex lock(gLock);
     if (result->fNumberFormat[style-1] == NULL) {
         if (gPosixNumberFormat[style-1] == NULL) {
             UErrorCode status = U_ZERO_ERROR;