mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 01:08:26 +00:00
Removed mostly unused SDL_errorcode
This commit is contained in:
parent
afe7c7a644
commit
04be04c338
9 changed files with 41 additions and 60 deletions
|
@ -65,6 +65,17 @@ extern "C" {
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* Set an error indicating that memory allocation failed.
|
||||
*
|
||||
* This function does not do any memory allocation.
|
||||
*
|
||||
* \returns -1
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_OutOfMemory(void);
|
||||
|
||||
/**
|
||||
* Retrieve a message about the last error that occurred on the current
|
||||
* thread.
|
||||
|
@ -121,28 +132,8 @@ extern DECLSPEC int SDLCALL SDL_ClearError(void);
|
|||
* Private error reporting function - used internally.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||
#define SDL_Unsupported() SDL_SetError("That operation is not supported")
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
typedef enum SDL_errorcode
|
||||
{
|
||||
SDL_ENOMEM,
|
||||
SDL_EFREAD,
|
||||
SDL_EFWRITE,
|
||||
SDL_EFSEEK,
|
||||
SDL_UNSUPPORTED,
|
||||
SDL_LASTERROR
|
||||
} SDL_errorcode;
|
||||
|
||||
/**
|
||||
* Set an SDL error from a list of error codes.
|
||||
*
|
||||
* \param code Error code
|
||||
* \returns unconditionally -1.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||
/* @} *//* Internal error functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue