Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: source/i18n/uspoof.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/i18n/usearch.cpp ('k') | source/i18n/uspoof_impl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 *************************************************************************** 2 ***************************************************************************
3 * Copyright (C) 2008-2013, International Business Machines Corporation 3 * Copyright (C) 2008-2014, International Business Machines Corporation
4 * and others. All Rights Reserved. 4 * and others. All Rights Reserved.
5 *************************************************************************** 5 ***************************************************************************
6 * file name: uspoof.cpp 6 * file name: uspoof.cpp
7 * encoding: US-ASCII 7 * encoding: US-ASCII
8 * tab size: 8 (not used) 8 * tab size: 8 (not used)
9 * indentation:4 9 * indentation:4
10 * 10 *
11 * created on: 2008Feb13 11 * created on: 2008Feb13
12 * created by: Andy Heninger 12 * created by: Andy Heninger
13 * 13 *
(...skipping 19 matching lines...) Expand all
33 33
34 U_NAMESPACE_USE 34 U_NAMESPACE_USE
35 35
36 36
37 // 37 //
38 // Static Objects used by the spoof impl, their thread safe initialization and t heir cleanup. 38 // Static Objects used by the spoof impl, their thread safe initialization and t heir cleanup.
39 // 39 //
40 static UnicodeSet *gInclusionSet = NULL; 40 static UnicodeSet *gInclusionSet = NULL;
41 static UnicodeSet *gRecommendedSet = NULL; 41 static UnicodeSet *gRecommendedSet = NULL;
42 static const Normalizer2 *gNfdNormalizer = NULL; 42 static const Normalizer2 *gNfdNormalizer = NULL;
43 static UMutex gInitMutex = U_MUTEX_INITIALIZER; 43 static UInitOnce gSpoofInitOnce = U_INITONCE_INITIALIZER;
44 44
45 static UBool U_CALLCONV 45 static UBool U_CALLCONV
46 uspoof_cleanup(void) { 46 uspoof_cleanup(void) {
47 delete gInclusionSet; 47 delete gInclusionSet;
48 gInclusionSet = NULL; 48 gInclusionSet = NULL;
49 delete gRecommendedSet; 49 delete gRecommendedSet;
50 gRecommendedSet = NULL; 50 gRecommendedSet = NULL;
51 gNfdNormalizer = NULL; 51 gNfdNormalizer = NULL;
52 gSpoofInitOnce.reset();
52 return TRUE; 53 return TRUE;
53 } 54 }
54 55
55 static void initializeStatics() { 56 static void U_CALLCONV initializeStatics(UErrorCode &status) {
56 Mutex m(&gInitMutex); 57 static const char *inclusionPat =
57 UErrorCode status = U_ZERO_ERROR; 58 "[\\u0027\\u002d-\\u002e\\u003A\\u00B7\\u0375\\u058A\\u05F3-\\u05F4"
58 if (gInclusionSet == NULL) { 59 "\\u06FD-\\u06FE\\u0F0B\\u200C-\\u200D\\u2010\\u2019\\u2027\\u30A0\\u 30FB]";
59 gInclusionSet = new UnicodeSet(UNICODE_STRING_SIMPLE("[\ 60 gInclusionSet = new UnicodeSet(UnicodeString(inclusionPat, -1, US_INV), stat us);
60 \\-.\\u00B7\\u05F3\\u05F4\\u0F0B\\u200C\\u200D\\u2019]"), status); 61
61 gRecommendedSet = new UnicodeSet(UNICODE_STRING_SIMPLE("[\ 62 // Note: data from http://unicode.org/Public/security/latest/xidmodification s.txt version 6.3.0
62 [0-z\\u00C0-\\u017E\\u01A0\\u01A1\\u01AF\\u01B0\\u01CD-\ 63 // Note: concatenated string constants do not work with UNICODE_STRING_SIMPL E on all platforms.
63 \\u01DC\\u01DE-\\u01E3\\u01E6-\\u01F5\\u01F8-\\u021B\\u021E\ 64 static const char *recommendedPat =
64 \\u021F\\u0226-\\u0233\\u02BB\\u02BC\\u02EC\\u0300-\\u0304\ 65 "[\\u0030-\\u0039\\u0041-\\u005A\\u005F\\u0061-\\u007A\\u00C0-\\u00D 6\\u00D8-\\u00F6"
65 \\u0306-\\u030C\\u030F-\\u0311\\u0313\\u0314\\u031B\\u0323-\ 66 "\\u00F8-\\u0131\\u0134-\\u013E\\u0141-\\u0148\\u014A-\\u017E\\u01A0 -\\u01A1\\u01AF-\\u01B0"
66 \\u0328\\u032D\\u032E\\u0330\\u0331\\u0335\\u0338\\u0339\ 67 "\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01F0\\u01F4-\\u01F5\\u01F8 -\\u021B\\u021E-\\u021F"
67 \\u0342-\\u0345\\u037B-\\u03CE\\u03FC-\\u045F\\u048A-\\u0525\ 68 "\\u0226-\\u0233\\u0259\\u02BB-\\u02BC\\u02EC\\u0300-\\u0304\\u0306- \\u030C\\u030F-\\u0311"
68 \\u0531-\\u0586\\u05D0-\\u05F2\\u0621-\\u063F\\u0641-\\u0655\ 69 "\\u0313-\\u0314\\u031B\\u0323-\\u0328\\u032D-\\u032E\\u0330-\\u0331 \\u0335\\u0338-\\u0339"
69 \\u0660-\\u0669\\u0670-\\u068D\\u068F-\\u06D5\\u06E5\\u06E6\ 70 "\\u0342\\u0345\\u037B-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\ \u03A1\\u03A3-\\u03CE"
70 \\u06EE-\\u06FF\\u0750-\\u07B1\\u0901-\\u0939\\u093C-\\u094D\ 71 "\\u03FC-\\u045F\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0586 \\u05B4\\u05D0-\\u05EA"
71 \\u0950\\u0960-\\u0972\\u0979-\\u0A4D\\u0A5C-\\u0A74\\u0A81-\ 72 "\\u05F0-\\u05F2\\u0620-\\u063F\\u0641-\\u0655\\u0660-\\u0669\\u0670 -\\u0672\\u0674"
72 \\u0B43\\u0B47-\\u0B61\\u0B66-\\u0C56\\u0C60\\u0C61\\u0C66-\ 73 "\\u0679-\\u068D\\u068F-\\u06D3\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06FC \\u06FF\\u0750-\\u07B1"
73 \\u0CD6\\u0CE0-\\u0CEF\\u0D02-\\u0D28\\u0D2A-\\u0D39\\u0D3D-\ 74 "\\u08A0\\u08A2-\\u08AC\\u0901-\\u094D\\u094F-\\u0950\\u0956-\\u0957 \\u0960-\\u0963"
74 \\u0D43\\u0D46-\\u0D4D\\u0D57-\\u0D61\\u0D66-\\u0D8E\\u0D91-\ 75 "\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097F\\u0981-\\u0983\\u0985 -\\u098C\\u098F-\\u0990"
75 \\u0DA5\\u0DA7-\\u0DDE\\u0DF2\\u0E01-\\u0ED9\\u0F00\\u0F20-\ 76 "\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4 \\u09C7-\\u09C8"
76 \\u0F8B\\u0F90-\\u109D\\u10D0-\\u10F0\\u10F7-\\u10FA\\u1200-\ 77 "\\u09CB-\\u09CE\\u09D7\\u09E0-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03 \\u0A05-\\u0A0A"
77 \\u135A\\u135F\\u1380-\\u138F\\u1401-\\u167F\\u1780-\\u17A2\ 78 "\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A35\\u0A38- \\u0A39\\u0A3C"
78 \\u17A5-\\u17A7\\u17A9-\\u17B3\\u17B6-\\u17CA\\u17D2\\u17D7-\ 79 "\\u0A3E-\\u0A42\\u0A47-\\u0A48\\u0A4B-\\u0A4D\\u0A5C\\u0A66-\\u0A74 \\u0A81-\\u0A83"
79 \\u17DC\\u17E0-\\u17E9\\u1810-\\u18A8\\u18AA-\\u18F5\\u1E00-\ 80 "\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2 -\\u0AB3\\u0AB5-\\u0AB9"
80 \\u1E99\\u1F00-\\u1FFC\\u2D30-\\u2D65\\u2D80-\\u2DDE\\u3005-\ 81 "\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3 \\u0AE6-\\u0AEF"
81 \\u3007\\u3041-\\u31B7\\u3400-\\u9FCB\\uA000-\\uA48C\\uA67F\ 82 "\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F-\\u0B10\\u0B13-\\u0B28\\u0B2A -\\u0B30\\u0B32-\\u0B33"
82 \\uA717-\\uA71F\\uA788\\uAA60-\\uAA7B\\uAC00-\\uD7A3\\uFA0E-\ 83 "\\u0B35-\\u0B39\\u0B3C-\\u0B43\\u0B47-\\u0B48\\u0B4B-\\u0B4D\\u0B56 -\\u0B57\\u0B5F-\\u0B61"
83 \\uFA29\\U00020000-\ 84 "\\u0B66-\\u0B6F\\u0B71\\u0B82-\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90 \\u0B92-\\u0B95"
84 \\U0002B734]-[[:Cn:][:nfkcqc=n:][:XIDC=n:]]]"), status); 85 "\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA \\u0BAE-\\u0BB9"
85 gNfdNormalizer = Normalizer2::getNFDInstance(status); 86 "\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6- \\u0BEF\\u0C01-\\u0C03"
86 } 87 "\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35 -\\u0C39\\u0C3D-\\u0C44"
88 "\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55-\\u0C56\\u0C60-\\u0C61\\u0C66 -\\u0C6F\\u0C82-\\u0C83"
89 "\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5 -\\u0CB9\\u0CBC-\\u0CC4"
90 "\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5-\\u0CD6\\u0CE0-\\u0CE3\\u0CE6 -\\u0CEF\\u0CF1-\\u0CF2"
91 "\\u0D02-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D -\\u0D43\\u0D46-\\u0D48"
92 "\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D61\\u0D66-\\u0D6F\\u0D7A-\\u0D7F \\u0D82-\\u0D83"
93 "\\u0D85-\\u0D8E\\u0D91-\\u0D96\\u0D9A-\\u0DA5\\u0DA7-\\u0DB1\\u0DB3 -\\u0DBB\\u0DBD"
94 "\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDE\\u0DF2\ \u0E01-\\u0E32"
95 "\\u0E34-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81-\\u0E82\\u0E84 \\u0E87-\\u0E88"
96 "\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\ \u0EA7\\u0EAA-\\u0EAB"
97 "\\u0EAD-\\u0EB2\\u0EB4-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6 \\u0EC8-\\u0ECD"
98 "\\u0ED0-\\u0ED9\\u0EDE-\\u0EDF\\u0F00\\u0F20-\\u0F29\\u0F35\\u0F37\ \u0F3E-\\u0F42"
99 "\\u0F44-\\u0F47\\u0F49-\\u0F4C\\u0F4E-\\u0F51\\u0F53-\\u0F56\\u0F58 -\\u0F5B\\u0F5D-\\u0F68"
100 "\\u0F6A-\\u0F6C\\u0F71-\\u0F72\\u0F74\\u0F7A-\\u0F80\\u0F82-\\u0F84 \\u0F86-\\u0F92"
101 "\\u0F94-\\u0F97\\u0F99-\\u0F9C\\u0F9E-\\u0FA1\\u0FA3-\\u0FA6\\u0FA8 -\\u0FAB\\u0FAD-\\u0FB8"
102 "\\u0FBA-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10C7\\u10CD\ \u10D0-\\u10F0"
103 "\\u10F7-\\u10FA\\u10FD-\\u10FF\\u1200-\\u1248\\u124A-\\u124D\\u1250 -\\u1256\\u1258"
104 "\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2 -\\u12B5\\u12B8-\\u12BE"
105 "\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315 \\u1318-\\u135A"
106 "\\u135D-\\u135F\\u1380-\\u138F\\u1780-\\u17A2\\u17A5-\\u17A7\\u17A9 -\\u17B3\\u17B6-\\u17CA"
107 "\\u17D2\\u17D7\\u17DC\\u17E0-\\u17E9\\u1E00-\\u1E99\\u1EBF\\u1F00-\ \u1F15\\u1F18-\\u1F1D"
108 "\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\ \u1F5F-\\u1F70"
109 "\\u1F72\\u1F74\\u1F76\\u1F78\\u1F7A\\u1F7C\\u1F80-\\u1FB4\\u1FB6-\\ u1FBA\\u1FBC\\u1FC2-\\u1FC4"
110 "\\u1FC6-\\u1FC8\\u1FCA\\u1FCC\\u1FD0-\\u1FD2\\u1FD6-\\u1FDA\\u1FE0- \\u1FE2\\u1FE4-\\u1FEA"
111 "\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FF8\\u1FFA\\u1FFC\\u2D27\\u2D2D\\ u2D80-\\u2D96\\u2DA0-\\u2DA6"
112 "\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8 -\\u2DCE\\u2DD0-\\u2DD6"
113 "\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3041-\\u3096\\u3099-\\u309A\\u309D -\\u309E\\u30A1-\\u30FA"
114 "\\u30FC-\\u30FE\\u3105-\\u312D\\u31A0-\\u31BA\\u3400-\\u4DB5\\u4E00 -\\u9FCC\\uA660-\\uA661"
115 "\\uA674-\\uA67B\\uA67F\\uA69F\\uA717-\\uA71F\\uA788\\uA78D-\\uA78E\ \uA790-\\uA793"
116 "\\uA7A0-\\uA7AA\\uA7FA\\uA9CF\\uAA60-\\uAA76\\uAA7A-\\uAA7B\\uAB01- \\uAB06\\uAB09-\\uAB0E"
117 "\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAC00-\\uD7A3\\uFA0E -\\uFA0F\\uFA11"
118 "\\uFA13-\\uFA14\\uFA1F\\uFA21\\uFA23-\\uFA24\\uFA27-\\uFA29\\U0001B 000-\\U0001B001\\U00020000-\\U0002A6D6"
119 "\\U0002A700-\\U0002B734\\U0002B740-\\U0002B81D]";
120 gRecommendedSet = new UnicodeSet(UnicodeString(recommendedPat, -1, US_INV), status);
121 gNfdNormalizer = Normalizer2::getNFDInstance(status);
87 ucln_i18n_registerCleanup(UCLN_I18N_SPOOF, uspoof_cleanup); 122 ucln_i18n_registerCleanup(UCLN_I18N_SPOOF, uspoof_cleanup);
88
89 return;
90 } 123 }
91 124
92 125
93 U_CAPI USpoofChecker * U_EXPORT2 126 U_CAPI USpoofChecker * U_EXPORT2
94 uspoof_open(UErrorCode *status) { 127 uspoof_open(UErrorCode *status) {
95 if (U_FAILURE(*status)) { 128 if (U_FAILURE(*status)) {
96 return NULL; 129 return NULL;
97 } 130 }
98 initializeStatics(); 131 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
99 SpoofImpl *si = new SpoofImpl(SpoofData::getDefault(*status), *status); 132 SpoofImpl *si = new SpoofImpl(SpoofData::getDefault(*status), *status);
100 if (U_FAILURE(*status)) { 133 if (U_FAILURE(*status)) {
101 delete si; 134 delete si;
102 si = NULL; 135 si = NULL;
103 } 136 }
104 return reinterpret_cast<USpoofChecker *>(si); 137 return reinterpret_cast<USpoofChecker *>(si);
105 } 138 }
106 139
107 140
108 U_CAPI USpoofChecker * U_EXPORT2 141 U_CAPI USpoofChecker * U_EXPORT2
109 uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng th, 142 uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng th,
110 UErrorCode *status) { 143 UErrorCode *status) {
111 if (U_FAILURE(*status)) { 144 if (U_FAILURE(*status)) {
112 return NULL; 145 return NULL;
113 } 146 }
114 initializeStatics(); 147 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
115 SpoofData *sd = new SpoofData(data, length, *status); 148 SpoofData *sd = new SpoofData(data, length, *status);
116 SpoofImpl *si = new SpoofImpl(sd, *status); 149 SpoofImpl *si = new SpoofImpl(sd, *status);
117 if (U_FAILURE(*status)) { 150 if (U_FAILURE(*status)) {
118 delete sd; 151 delete sd;
119 delete si; 152 delete si;
120 return NULL; 153 return NULL;
121 } 154 }
122 if (sd == NULL || si == NULL) { 155 if (sd == NULL || si == NULL) {
123 *status = U_MEMORY_ALLOCATION_ERROR; 156 *status = U_MEMORY_ALLOCATION_ERROR;
124 delete sd; 157 delete sd;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 191
159 U_CAPI void U_EXPORT2 192 U_CAPI void U_EXPORT2
160 uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status) { 193 uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status) {
161 SpoofImpl *This = SpoofImpl::validateThis(sc, *status); 194 SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
162 if (This == NULL) { 195 if (This == NULL) {
163 return; 196 return;
164 } 197 }
165 198
166 // Verify that the requested checks are all ones (bits) that 199 // Verify that the requested checks are all ones (bits) that
167 // are acceptable, known values. 200 // are acceptable, known values.
168 if (checks & ~USPOOF_ALL_CHECKS) { 201 if (checks & ~(USPOOF_ALL_CHECKS | USPOOF_AUX_INFO)) {
169 *status = U_ILLEGAL_ARGUMENT_ERROR; 202 *status = U_ILLEGAL_ARGUMENT_ERROR;
170 return; 203 return;
171 } 204 }
172 205
173 This->fChecks = checks; 206 This->fChecks = checks;
174 } 207 }
175 208
176 209
177 U_CAPI int32_t U_EXPORT2 210 U_CAPI int32_t U_EXPORT2
178 uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status) { 211 uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status) {
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 int32_t dataSize = This->fSpoofData->fRawData->fLength; 734 int32_t dataSize = This->fSpoofData->fRawData->fLength;
702 if (capacity < dataSize) { 735 if (capacity < dataSize) {
703 *status = U_BUFFER_OVERFLOW_ERROR; 736 *status = U_BUFFER_OVERFLOW_ERROR;
704 return dataSize; 737 return dataSize;
705 } 738 }
706 uprv_memcpy(buf, This->fSpoofData->fRawData, dataSize); 739 uprv_memcpy(buf, This->fSpoofData->fRawData, dataSize);
707 return dataSize; 740 return dataSize;
708 } 741 }
709 742
710 U_CAPI const USet * U_EXPORT2 743 U_CAPI const USet * U_EXPORT2
711 uspoof_getInclusionSet(UErrorCode *) { 744 uspoof_getInclusionSet(UErrorCode *status) {
712 initializeStatics(); 745 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
713 return gInclusionSet->toUSet(); 746 return gInclusionSet->toUSet();
714 } 747 }
715 748
716 U_CAPI const USet * U_EXPORT2 749 U_CAPI const USet * U_EXPORT2
717 uspoof_getRecommendedSet(UErrorCode *) { 750 uspoof_getRecommendedSet(UErrorCode *status) {
718 initializeStatics(); 751 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
719 return gRecommendedSet->toUSet(); 752 return gRecommendedSet->toUSet();
720 } 753 }
721 754
722 U_I18N_API const UnicodeSet * U_EXPORT2 755 U_I18N_API const UnicodeSet * U_EXPORT2
723 uspoof_getInclusionUnicodeSet(UErrorCode *) { 756 uspoof_getInclusionUnicodeSet(UErrorCode *status) {
724 initializeStatics(); 757 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
725 return gInclusionSet; 758 return gInclusionSet;
726 } 759 }
727 760
728 U_I18N_API const UnicodeSet * U_EXPORT2 761 U_I18N_API const UnicodeSet * U_EXPORT2
729 uspoof_getRecommendedUnicodeSet(UErrorCode *) { 762 uspoof_getRecommendedUnicodeSet(UErrorCode *status) {
730 initializeStatics(); 763 umtx_initOnce(gSpoofInitOnce, &initializeStatics, *status);
731 return gRecommendedSet; 764 return gRecommendedSet;
732 } 765 }
733 766
734 767
735 768
736 #endif // !UCONFIG_NO_NORMALIZATION 769 #endif // !UCONFIG_NO_NORMALIZATION
OLDNEW
« no previous file with comments | « source/i18n/usearch.cpp ('k') | source/i18n/uspoof_impl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698