2 * Sherlock Library -- Character Conversion with Allocation on a Memory Pool
4 * (c) 2006 Pavel Charvat <pchar@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 #ifndef _CHARSET_MP_CHARCONV_H
11 #define _CHARSET_MP_CHARCONV_H
13 #include <ucw/mempool.h>
14 #include <charset/charconv.h>
16 #ifdef CONFIG_UCW_CLEAN_ABI
17 #define mp_strconv ucw_mp_strconv
20 byte *mp_strconv(struct mempool *mp, const byte *s, uns cs_in, uns cs_out);
22 static inline byte *mp_strconv_to_utf8(struct mempool *mp, const byte *s, uns cs_in)
23 { return mp_strconv(mp, s, cs_in, CONV_CHARSET_UTF8); }
25 static inline byte *mp_strconv_from_utf8(struct mempool *mp, const byte *s, uns cs_out)
26 { return mp_strconv(mp, s, CONV_CHARSET_UTF8, cs_out); }