diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-24 14:45:31 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-24 14:45:31 +0200 |
commit | 61013deff80dbe3a3dfaa7b5060609500f1f63fa (patch) | |
tree | 77389b2f504d1347d2bdd1efc10656db8ad159cc /lib | |
parent | 56a0b035c676af73eaa93446132e930cc95fae94 (diff) | |
download | samba-61013deff80dbe3a3dfaa7b5060609500f1f63fa.tar.gz samba-61013deff80dbe3a3dfaa7b5060609500f1f63fa.tar.bz2 samba-61013deff80dbe3a3dfaa7b5060609500f1f63fa.zip |
Remove dependency of charset code on loadparm.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/charset/charset.h | 1 | ||||
-rw-r--r-- | lib/util/charset/util_unistr.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index 56fa36faf3..51e0193173 100644 --- a/lib/util/charset/charset.h +++ b/lib/util/charset/charset.h @@ -122,6 +122,7 @@ ssize_t convert_string(charset_t from, charset_t to, void const *src, size_t srclen, void *dest, size_t destlen); +extern struct smb_iconv_convenience *global_iconv_convenience; /* codepoints */ codepoint_t next_codepoint(struct smb_iconv_convenience *ic, diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c index 91d0be109a..a40b4298a4 100644 --- a/lib/util/charset/util_unistr.c +++ b/lib/util/charset/util_unistr.c @@ -20,11 +20,14 @@ #include "includes.h" #include "system/locale.h" -#include "param/param.h" + +struct smb_iconv_convenience *global_iconv_convenience = NULL; static inline struct smb_iconv_convenience *get_iconv_convenience(void) { - return lp_iconv_convenience(global_loadparm); + if (global_iconv_convenience == NULL) + global_iconv_convenience = smb_iconv_convenience_init(talloc_autofree_context(), "ASCII", "UTF-8", true); + return global_iconv_convenience; } /** |