Exemple #1
0
void ucln_i18n_registerCleanup(ECleanupI18NType type,
                               cleanupFunc *func)
{
    U_ASSERT(UCLN_I18N_START < type && type < UCLN_I18N_COUNT);
    ucln_registerCleanup(UCLN_I18N, i18n_cleanup);
    if (UCLN_I18N_START < type && type < UCLN_I18N_COUNT)
    {
        gCleanupFunctions[type] = func;
    }
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
    ucln_registerAutomaticCleanup();
#endif
}
U_CFUNC void
ucln_common_registerCleanup(ECleanupCommonType type,
                            cleanupFunc *func)
{
    U_ASSERT(UCLN_COMMON_START < type && type < UCLN_COMMON_COUNT);
    if (UCLN_COMMON_START < type && type < UCLN_COMMON_COUNT)
    {
        gCommonCleanupFunctions[type] = func;
    }
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
    ucln_registerAutomaticCleanup();
#endif
}
Exemple #3
0
void ucln_io_registerCleanup(ECleanupIOType type,
                               cleanupFunc *func) {
    U_ASSERT(UCLN_IO_START < type && type < UCLN_IO_COUNT);
    {
        icu::Mutex m;       // See ticket 10295 for discussion.
        ucln_registerCleanup(UCLN_IO, io_cleanup);
        if (UCLN_IO_START < type && type < UCLN_IO_COUNT) {
            gCleanupFunctions[type] = func;
        }
    }

#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
    ucln_registerAutomaticCleanup();
#endif
}