diff options
Diffstat (limited to 'lib/striconv.h')
-rw-r--r-- | lib/striconv.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/striconv.h b/lib/striconv.h index 69da35d..a4164da 100644 --- a/lib/striconv.h +++ b/lib/striconv.h @@ -1,5 +1,5 @@ /* Charset conversion. - Copyright (C) 2001-2004, 2006-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This file is free software: you can redistribute it and/or modify @@ -18,7 +18,12 @@ #ifndef _STRICONV_H #define _STRICONV_H -#include <stddef.h> +/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +#include <stdlib.h> #if HAVE_ICONV #include <iconv.h> #endif @@ -52,7 +57,8 @@ extern int mem_cd_iconv (const char *src, size_t srclen, iconv_t cd, Allocate a malloced memory block for the result. Return value: the freshly allocated resulting NUL-terminated string if successful, otherwise NULL and errno set. */ -extern char * str_cd_iconv (const char *src, iconv_t cd); +extern char * str_cd_iconv (const char *src, iconv_t cd) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #endif @@ -64,7 +70,8 @@ extern char * str_cd_iconv (const char *src, iconv_t cd); Return value: the freshly allocated resulting NUL-terminated string if successful, otherwise NULL and errno set. */ extern char * str_iconv (const char *src, - const char *from_codeset, const char *to_codeset); + const char *from_codeset, const char *to_codeset) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #ifdef __cplusplus |