# HG changeset patch # User Sam Lantinga # Date 1183008950 0 # Node ID b74530a1dad60df29f29e6427e0538dac85ddd81 # Parent 540466e900db02587ca95f43aecc9aec29f60b8b Better fix for bug 419 diff -r 540466e900db -r b74530a1dad6 include/SDL_stdinc.h --- a/include/SDL_stdinc.h Wed Jun 27 10:12:49 2007 +0000 +++ b/include/SDL_stdinc.h Thu Jun 28 05:35:50 2007 +0000 @@ -574,13 +574,12 @@ #define SDL_iconv_t iconv_t #define SDL_iconv_open iconv_open #define SDL_iconv_close iconv_close -extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); #else typedef struct _SDL_iconv_t *SDL_iconv_t; extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode); extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); +#endif extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); -#endif /* This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error. */ diff -r 540466e900db -r b74530a1dad6 src/stdlib/SDL_iconv.c --- a/src/stdlib/SDL_iconv.c Wed Jun 27 10:12:49 2007 +0000 +++ b/src/stdlib/SDL_iconv.c Thu Jun 28 05:35:50 2007 +0000 @@ -31,7 +31,7 @@ #include size_t SDL_iconv(SDL_iconv_t cd, - char **inbuf, size_t *inbytesleft, + const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { size_t retCode = iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);