ICU-4077 usearch needs to reset its FCD pointer when u_cleanup is called.

X-SVN-Rev: 16186
This commit is contained in:
George Rhoten 2004-08-26 14:15:30 +00:00
parent 8a4279d08f
commit 77d1b40a06
3 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,7 @@ static UBool i18n_cleanup(void)
#endif
#if !UCONFIG_NO_COLLATION
usearch_cleanup();
collator_cleanup();
ucol_cleanup();
ucol_bld_cleanup();

View file

@ -42,4 +42,6 @@ U_CFUNC UBool ucol_bld_cleanup(void);
U_CFUNC UBool regex_cleanup(void);
U_CFUNC UBool usearch_cleanup(void);
#endif

View file

@ -18,6 +18,7 @@
#include "ucol_imp.h"
#include "usrchimp.h"
#include "cmemory.h"
#include "ucln_in.h"
// internal definition ---------------------------------------------------
@ -94,9 +95,16 @@ inline void initializeFCD(UErrorCode *status)
{
if (FCD_ == NULL) {
FCD_ = unorm_getFCDTrie(status);
ucln_i18n_registerCleanup();
}
}
U_CFUNC UBool
usearch_cleanup(void) {
FCD_ = NULL;
return TRUE;
}
/**
* Gets the fcd value for a character at the argument index.
* This method takes into accounts of the supplementary characters.