mirror of
https://github.com/yawut/SDL.git
synced 2026-04-24 07:16:52 -05:00
While you can actually write to the error buffer, conceptually it's read-only.
This commit is contained in:
parent
f0480c0501
commit
39db467ca6
|
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
|
||||
/* 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);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -198,12 +198,12 @@ SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
|
|||
}
|
||||
|
||||
/* 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user