# HG changeset patch # User Sam Lantinga # Date 1283108409 25200 # Node ID ba7492f9e2b8388b0cf253b149e236db3cc2c8da # Parent f42e8db53f78841321778dbf802b43765c22c584 While you can actually write to the error buffer, conceptually it's read-only. diff -r f42e8db53f78 -r ba7492f9e2b8 include/SDL_error.h --- a/include/SDL_error.h Sat Aug 28 22:56:52 2010 -0700 +++ b/include/SDL_error.h Sun Aug 29 12:00:09 2010 -0700 @@ -41,7 +41,7 @@ /* Public functions */ extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...); -extern DECLSPEC char *SDLCALL SDL_GetError(void); +extern DECLSPEC const char *SDLCALL SDL_GetError(void); extern DECLSPEC void SDLCALL SDL_ClearError(void); /** diff -r f42e8db53f78 -r ba7492f9e2b8 src/SDL_error.c --- a/src/SDL_error.c Sat Aug 28 22:56:52 2010 -0700 +++ b/src/SDL_error.c Sun Aug 29 12:00:09 2010 -0700 @@ -198,12 +198,12 @@ } /* Available for backwards compatibility */ -char * +const char * SDL_GetError(void) { static char errmsg[SDL_ERRBUFIZE]; - return ((char *) SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE)); + return SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE); } void