Better fix for bug 419 SDL-1.2
authorSam Lantinga
Thu, 28 Jun 2007 05:35:50 +0000
branchSDL-1.2
changeset 3984b74530a1dad6
parent 3983 540466e900db
child 3985 2f8efcf14c83
Better fix for bug 419
include/SDL_stdinc.h
src/stdlib/SDL_iconv.c
     1.1 --- a/include/SDL_stdinc.h	Wed Jun 27 10:12:49 2007 +0000
     1.2 +++ b/include/SDL_stdinc.h	Thu Jun 28 05:35:50 2007 +0000
     1.3 @@ -574,13 +574,12 @@
     1.4  #define SDL_iconv_t     iconv_t
     1.5  #define SDL_iconv_open  iconv_open
     1.6  #define SDL_iconv_close iconv_close
     1.7 -extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
     1.8  #else
     1.9  typedef struct _SDL_iconv_t *SDL_iconv_t;
    1.10  extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
    1.11  extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
    1.12 +#endif
    1.13  extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
    1.14 -#endif
    1.15  /* This function converts a string between encodings in one pass, returning a
    1.16     string that must be freed with SDL_free() or NULL on error.
    1.17  */
     2.1 --- a/src/stdlib/SDL_iconv.c	Wed Jun 27 10:12:49 2007 +0000
     2.2 +++ b/src/stdlib/SDL_iconv.c	Thu Jun 28 05:35:50 2007 +0000
     2.3 @@ -31,7 +31,7 @@
     2.4  #include <errno.h>
     2.5  
     2.6  size_t SDL_iconv(SDL_iconv_t cd,
     2.7 -                 char **inbuf, size_t *inbytesleft,
     2.8 +                 const char **inbuf, size_t *inbytesleft,
     2.9                   char **outbuf, size_t *outbytesleft)
    2.10  {
    2.11  	size_t retCode = iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);