]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/uinit.cpp
2 ******************************************************************************
3 * Copyright (C) 2001-2015, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************
8 * tab size: 8 (not used)
11 * created on: 2001July05
12 * created by: George Rhoten
15 #include "unicode/utypes.h"
16 #include "unicode/icuplug.h"
17 #include "unicode/uclean.h"
19 #include "icuplugimp.h"
27 static UInitOnce gICUInitOnce
= U_INITONCE_INITIALIZER
;
29 static UBool U_CALLCONV
uinit_cleanup() {
34 static void U_CALLCONV
35 initData(UErrorCode
&status
)
37 #if UCONFIG_ENABLE_PLUGINS
38 /* initialize plugins */
42 #if !UCONFIG_NO_CONVERSION
46 * ICU4C 3.4 (jitterbug 4497) hardcodes the data for Unicode character
47 * properties for APIs that want to be fast.
48 * Therefore, we need not load them here nor check for errors.
49 * Instead, we load the converter alias table to see if any ICU data
51 * Users should really open the service objects they need and check
52 * for errors there, to make sure that the actual items they need are
55 ucnv_io_countKnownConverters(&status
);
57 ucln_common_registerCleanup(UCLN_COMMON_UINIT
, uinit_cleanup
);
65 * ICU Initialization Function. Need not be called.
68 u_init(UErrorCode
*status
) {
69 UTRACE_ENTRY_OC(UTRACE_U_INIT
);
70 umtx_initOnce(gICUInitOnce
, &initData
, *status
);
71 UTRACE_EXIT_STATUS(*status
);