]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/io/locbund.cpp
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / io / locbund.cpp
index 8e880b17cf2af11054478958dd9fc969f92d9ada..4b6fe34c29e8cfa75ceb877dd40d246b5479aa03 100644 (file)
@@ -45,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;