/*
*******************************************************************************
*
-* Copyright (C) 1998-2004, International Business Machines
+* Copyright (C) 1998-2010, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
}
}
+U_CAPI void U_EXPORT2
+u_flushDefaultConverter()
+{
+ UConverter *converter = NULL;
+
+ if (gDefaultConverter != NULL) {
+ umtx_lock(NULL);
+
+ /* need to check to make sure it wasn't taken out from under us */
+ if (gDefaultConverter != NULL) {
+ converter = gDefaultConverter;
+ gDefaultConverter = NULL;
+ }
+ umtx_unlock(NULL);
+ }
+
+ /* if the cache was populated, flush it */
+ if(converter != NULL) {
+ ucnv_close(converter);
+ }
+}
+
+
/* conversions between char* and UChar* ------------------------------------- */
/* maximum string length for u_uastrcpy() and u_austrcpy() implementations */