typedef void *iconv_t;
+/* Free resources allocated for descriptor CD for code conversion.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int iconv_close (iconv_t __cd);
+
/* Allocate descriptor for code conversion from codeset FROMCODE to
codeset TOCODE.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
+extern iconv_t iconv_open (const char *__tocode, const char *__fromcode)
+ __attribute_malloc__ __attr_dealloc (iconv_close, 1);
/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
code conversion algorithm specified by CD and place up to
char **__restrict __outbuf,
size_t *__restrict __outbytesleft);
-/* Free resources allocated for descriptor CD for code conversion.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int iconv_close (iconv_t __cd);
-
__END_DECLS
#endif /* iconv.h */