mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-1575 don't use global mutex
X-SVN-Rev: 7298
This commit is contained in:
parent
264c5e2f9a
commit
ecdf5e0a92
1 changed files with 7 additions and 1 deletions
|
@ -17,6 +17,11 @@
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* Mutex for statics IN THIS FILE
|
||||
*/
|
||||
static UMTX MUTEX = 0;
|
||||
|
||||
/**
|
||||
* Generated in unicodetools, NFSkippable
|
||||
*/
|
||||
|
@ -318,7 +323,7 @@ void NormalizationTransliterator::handleTransliterate(Replaceable& text, UTransP
|
|||
|
||||
void NormalizationTransliterator::initStatics() {
|
||||
if (SKIPPABLES == NULL) {
|
||||
Mutex lock;
|
||||
Mutex lock(&MUTEX);
|
||||
if (SKIPPABLES == NULL) {
|
||||
SKIPPABLES = new UnicodeSet[4];
|
||||
UErrorCode ec = U_ZERO_ERROR;
|
||||
|
@ -651,6 +656,7 @@ void NormalizationTransliterator::cleanup() {
|
|||
if (SKIPPABLES != NULL) {
|
||||
delete[] SKIPPABLES;
|
||||
SKIPPABLES = NULL;
|
||||
umtx_destroy(&MUTEX);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue