mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
associate a deallocator for iconv_open
This patch associates iconv_close as a deallocator for iconv_open. This required moving the iconv_close declaration above iconv_open. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
parent
0e12ca0241
commit
260a430dd8
@ -29,12 +29,19 @@ __BEGIN_DECLS
|
||||
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
|
||||
@ -44,12 +51,6 @@ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user