]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/uinit.cpp
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 ******************************************************************************
5 * Copyright (C) 2001-2015, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 ******************************************************************************
10 * tab size: 8 (not used)
13 * created on: 2001July05
14 * created by: George Rhoten
17 #include "unicode/utypes.h"
18 #include "unicode/icuplug.h"
19 #include "unicode/uclean.h"
21 #include "icuplugimp.h"
29 static UInitOnce gICUInitOnce
= U_INITONCE_INITIALIZER
;
31 static UBool U_CALLCONV
uinit_cleanup() {
36 static void U_CALLCONV
37 initData(UErrorCode
&status
)
39 #if UCONFIG_ENABLE_PLUGINS
40 /* initialize plugins */
44 #if !UCONFIG_NO_CONVERSION
48 * ICU4C 3.4 (jitterbug 4497) hardcodes the data for Unicode character
49 * properties for APIs that want to be fast.
50 * Therefore, we need not load them here nor check for errors.
51 * Instead, we load the converter alias table to see if any ICU data
53 * Users should really open the service objects they need and check
54 * for errors there, to make sure that the actual items they need are
57 ucnv_io_countKnownConverters(&status
);
59 ucln_common_registerCleanup(UCLN_COMMON_UINIT
, uinit_cleanup
);
67 * ICU Initialization Function. Need not be called.
70 u_init(UErrorCode
*status
) {
71 UTRACE_ENTRY_OC(UTRACE_U_INIT
);
72 umtx_initOnce(gICUInitOnce
, &initData
, *status
);
73 UTRACE_EXIT_STATUS(*status
);