Files
semi-libc/src/locale/iconv_close.c
T
Rich Felker 5b546faa67 add iconv framework for decoding stateful encodings
assuming pointers obtained from malloc have some nonzero alignment,
repurpose the low bit of iconv_t as an indicator that the descriptor
is a stateless value representing the source and destination character
encodings.
2017-11-10 15:06:42 -05:00

9 lines
125 B
C

#include <iconv.h>
#include <stdlib.h>
int iconv_close(iconv_t cd)
{
if (!((size_t)cd & 1)) free((void *)cd);
return 0;
}