mirror of https://git.musl-libc.org/git/musl
Browse Source
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.master
2 changed files with 24 additions and 3 deletions
@ -1,6 +1,8 @@ |
|||
#include <iconv.h> |
|||
#include <stdlib.h> |
|||
|
|||
int iconv_close(iconv_t cd) |
|||
{ |
|||
if (!((size_t)cd & 1)) free((void *)cd); |
|||
return 0; |
|||
} |
|||
|
|||
Loading…
Reference in new issue