From 65014a74aa55209e8e5b65549be26645dabd7cba Mon Sep 17 00:00:00 2001 From: 2 Date: Wed, 3 Oct 2001 00:12:49 +0000 Subject: Change to camel_charset_iconv_open/close. 2001-10-02 * camel-sasl-digest-md5.c (digest_response): Change to camel_charset_iconv_open/close. * camel-pgp-context.c (pgp_verify): Change to camel_charset_iconv_open/close. * camel-mime-part-utils.c (convert_buffer): Change to camel_charset_iconv_open(). * camel-mime-filter-charset.c (camel_mime_filter_charset_new_convert, finalise): Change to camel_charset_iconv_open, etc. * camel-mime-utils.c: Use the camel_charset_iconv_open/close() functions to open/close it. * camel-charset-map.c (camel_charset_iconv_open): New function, wrap iconv_open, so we can cache ic's. (camel_charset_iconv_close): Likewise for close. (camel_charset_map_init,shutdown): Init/free iconv cache. svn path=/trunk/; revision=13361 --- camel/camel-mime-filter-charset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'camel/camel-mime-filter-charset.c') diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c index 4e59478683..bb9dd06acb 100644 --- a/camel/camel-mime-filter-charset.c +++ b/camel/camel-mime-filter-charset.c @@ -61,7 +61,7 @@ camel_mime_filter_charset_finalize(CamelObject *o) g_free(f->from); g_free(f->to); if (f->ic != (iconv_t)-1) { - iconv_close(f->ic); + camel_charset_iconv_close(f->ic); f->ic = (iconv_t) -1; } } @@ -234,7 +234,7 @@ camel_mime_filter_charset_new_convert (const char *from_charset, const char *to_ from_charset = camel_charset_to_iconv (from_charset); to_charset = camel_charset_to_iconv (to_charset); - new->ic = iconv_open (to_charset, from_charset); + new->ic = camel_charset_iconv_open (to_charset, from_charset); if (new->ic == (iconv_t) -1) { g_warning("Cannot create charset conversion from %s to %s: %s", from_charset, to_charset, strerror(errno)); camel_object_unref ((CamelObject *)new); -- cgit v1.2.3