Permalink
Browse files

win32: fix constness in win_iconv.c

warning: passing argument 2 of 'iconv' from incompatible pointer type [enabled by default]
note: expected 'const char **' but argument is of type 'gchar **'

See upstream bug:
http://code.google.com/p/win-iconv/issues/detail?id=8&can=1
  • Loading branch information...
1 parent 2b6e4b1 commit e278d49b79f0500b1e13b7284bcf937b0f61b25a @dieterv committed Sep 19, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 glib/win_iconv.c
View
@@ -60,7 +60,7 @@ typedef void* iconv_t;
iconv_t iconv_open(const char *tocode, const char *fromcode);
int iconv_close(iconv_t cd);
-size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
/* libiconv interface for vim */
#if defined(MAKE_DLL)
@@ -78,7 +78,7 @@ typedef struct rec_iconv_t rec_iconv_t;
typedef iconv_t (*f_iconv_open)(const char *tocode, const char *fromcode);
typedef int (*f_iconv_close)(iconv_t cd);
-typedef size_t (*f_iconv)(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+typedef size_t (*f_iconv)(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
typedef int* (*f_errno)(void);
typedef int (*f_mbtowc)(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize);
typedef int (*f_wctomb)(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize);
@@ -120,7 +120,7 @@ struct rec_iconv_t {
static int win_iconv_open(rec_iconv_t *cd, const char *tocode, const char *fromcode);
static int win_iconv_close(iconv_t cd);
-static size_t win_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+static size_t win_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
static int load_mlang();
static int make_csconv(const char *name, csconv_t *cv);
@@ -761,7 +761,7 @@ iconv_close(iconv_t _cd)
}
size_t
-iconv(iconv_t _cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
+iconv(iconv_t _cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
{
rec_iconv_t *cd = (rec_iconv_t *)_cd;
size_t r = cd->iconv(cd->cd, inbuf, inbytesleft, outbuf, outbytesleft);
@@ -788,7 +788,7 @@ win_iconv_close(iconv_t cd)
}
static size_t
-win_iconv(iconv_t _cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
+win_iconv(iconv_t _cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
{
rec_iconv_t *cd = (rec_iconv_t *)_cd;
ushort wbuf[MB_CHAR_MAX]; /* enough room for one character */

0 comments on commit e278d49

Please sign in to comment.