From 2a3a86a86f3d1ab97adda563beda7ee35f6a2414 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Feb 2011 13:47:28 +1100 Subject: lib/util/charcnv Move iconv handle setup in common We now use the struct smb_iconv_convenience at the core of all our iconv code, and use global_iconv_convenience for the callers that don't specify one. Andrew Bartlett --- lib/util/charset/util_unistr.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'lib/util/charset/util_unistr.c') diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c index 410547400d..b6bfb29e7d 100644 --- a/lib/util/charset/util_unistr.c +++ b/lib/util/charset/util_unistr.c @@ -21,16 +21,6 @@ #include "includes.h" #include "system/locale.h" -struct smb_iconv_convenience *global_iconv_convenience = NULL; - -static inline struct smb_iconv_convenience *get_iconv_convenience(void) -{ - if (global_iconv_convenience == NULL) - global_iconv_convenience = smb_iconv_convenience_reinit(talloc_autofree_context(), - "ASCII", "UTF-8", true, NULL); - return global_iconv_convenience; -} - /** Case insensitive string compararison **/ @@ -1043,19 +1033,3 @@ _PUBLIC_ bool convert_string_talloc(TALLOC_CTX *ctx, allow_badcharcnv); } -_PUBLIC_ codepoint_t next_codepoint_ext(const char *str, charset_t src_charset, - size_t *size) -{ - return next_codepoint_convenience_ext(get_iconv_convenience(), str, - src_charset, size); -} - -_PUBLIC_ codepoint_t next_codepoint(const char *str, size_t *size) -{ - return next_codepoint_convenience(get_iconv_convenience(), str, size); -} - -_PUBLIC_ ssize_t push_codepoint(char *str, codepoint_t c) -{ - return push_codepoint_convenience(get_iconv_convenience(), str, c); -} -- cgit