mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-09 15:27:38 +00:00
ICU-4077 usearch needs to reset its FCD pointer when u_cleanup is called.
X-SVN-Rev: 16186
This commit is contained in:
parent
8a4279d08f
commit
77d1b40a06
3 changed files with 11 additions and 0 deletions
|
@ -38,6 +38,7 @@ static UBool i18n_cleanup(void)
|
|||
#endif
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
usearch_cleanup();
|
||||
collator_cleanup();
|
||||
ucol_cleanup();
|
||||
ucol_bld_cleanup();
|
||||
|
|
|
@ -42,4 +42,6 @@ U_CFUNC UBool ucol_bld_cleanup(void);
|
|||
|
||||
U_CFUNC UBool regex_cleanup(void);
|
||||
|
||||
U_CFUNC UBool usearch_cleanup(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue