static const Normalizer2 *gNfdNormalizer = NULL;
static UInitOnce gSpoofInitStaticsOnce = U_INITONCE_INITIALIZER;
-static UBool U_CALLCONV
+namespace {
+
+UBool U_CALLCONV
uspoof_cleanup(void) {
delete gInclusionSet;
gInclusionSet = NULL;
return TRUE;
}
-static void U_CALLCONV initializeStatics(UErrorCode &status) {
+void U_CALLCONV initializeStatics(UErrorCode &status) {
static const char16_t *inclusionPat =
u"['\\-.\\:\\u00B7\\u0375\\u058A\\u05F3\\u05F4\\u06FD\\u06FE\\u0F0B\\u200C"
u"\\u200D\\u2010\\u2019\\u2027\\u30A0\\u30FB]";
ucln_i18n_registerCleanup(UCLN_I18N_SPOOF, uspoof_cleanup);
}
+} // namespace
+
U_CFUNC void uspoof_internalInitStatics(UErrorCode *status) {
umtx_initOnce(gSpoofInitStaticsOnce, &initializeStatics, *status);
}
return uspoof_check2UnicodeString(sc, id, NULL, status);
}
-static int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
+namespace {
+
+int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
U_ASSERT(This != NULL);
U_ASSERT(checkResult != NULL);
checkResult->clear();
return checkResult->toCombinedBitmask(This->fChecks);
}
+} // namespace
+
U_CAPI int32_t U_EXPORT2
uspoof_check2UnicodeString(const USpoofChecker *sc,
const icu::UnicodeString &id,