]> mj.ucw.cz Git - libucw.git/blobdiff - charset/mp-charconv.h
Opt: Constify
[libucw.git] / charset / mp-charconv.h
index 0c34c46927eed0b636beaa01812a9f8870b70111..5401d4f308955cd8326f057184e4a9571f910b71 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     Sherlock Library -- Character Conversion with Allocation on a Memory Pool 
+ *     Sherlock Library -- Character Conversion with Allocation on a Memory Pool
  *
  *     (c) 2006 Pavel Charvat <pchar@ucw.cz>
  *
  *
  *     (c) 2006 Pavel Charvat <pchar@ucw.cz>
  *
 #ifndef _CHARSET_MP_CHARCONV_H
 #define _CHARSET_MP_CHARCONV_H
 
 #ifndef _CHARSET_MP_CHARCONV_H
 #define _CHARSET_MP_CHARCONV_H
 
-#include "lib/mempool.h"
-#include "charset/charconv.h"
+#include <ucw/mempool.h>
+#include <charset/charconv.h>
 
 
-byte *mp_strconv(struct mempool *mp, byte *s, uns cs_in, uns cs_out);
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define mp_strconv ucw_mp_strconv
+#endif
+
+byte *mp_strconv(struct mempool *mp, const byte *s, uint cs_in, uint cs_out);
 
 
-static inline byte *
-mp_strconv_to_utf8(struct mempool *mp, byte *s, uns cs_in) 
+static inline byte *mp_strconv_to_utf8(struct mempool *mp, const byte *s, uint cs_in)
 { return mp_strconv(mp, s, cs_in, CONV_CHARSET_UTF8); }
 
 { return mp_strconv(mp, s, cs_in, CONV_CHARSET_UTF8); }
 
-static inline byte *
-mp_strconv_from_utf8(struct mempool *mp, byte *s, uns cs_out)
+static inline byte *mp_strconv_from_utf8(struct mempool *mp, const byte *s, uint cs_out)
 { return mp_strconv(mp, s, CONV_CHARSET_UTF8, cs_out); }
 
 #endif
 { return mp_strconv(mp, s, CONV_CHARSET_UTF8, cs_out); }
 
 #endif