void internal_function __libc_freeres_fn_section _nl_unload_domain (struct loaded_domain *domain) { size_t i; if (domain->plural != &__gettext_germanic_plural) __gettext_free_exp ((struct expression *) domain->plural); for (i = 0; i < domain->nconversions; i++) { struct converted_domain *convd = &domain->conversions[i]; free (convd->encoding); if (convd->conv_tab != NULL && convd->conv_tab != (char **) -1) free (convd->conv_tab); if (convd->conv != (__gconv_t) -1) __gconv_close (convd->conv); } if (domain->conversions != NULL) free (domain->conversions); __libc_rwlock_fini (domain->conversions_lock); if (domain->malloced) free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else # endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); free (domain); }
int iconv_close (iconv_t cd) { if (__builtin_expect (cd == (iconv_t *) -1L, 0)) { __set_errno (EBADF); return -1; } return __gconv_close ((__gconv_t) cd) ? -1 : 0; }
int iconv_close (iconv_t cd) { if (__glibc_unlikely (cd == (iconv_t *) -1L)) { __set_errno (EBADF); return -1; } return __gconv_close ((__gconv_t) cd) ? -1 : 0; }
/* Frees the codeset dependent parts of an opened message catalog. */ void internal_function _nl_free_domain_conv (struct loaded_domain *domain) { if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) free (domain->conv_tab); #ifdef _LIBC if (domain->conv != (__gconv_t) -1) __gconv_close (domain->conv); #else # if HAVE_ICONV if (domain->conv != (iconv_t) -1) iconv_close (domain->conv); # endif #endif }