mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 07:28:30 +00:00
Add SDL_internal macro for internal use
This commit is contained in:

committed by
Anonymous Maarten

parent
566e7c2379
commit
a7739ceccb
@@ -266,6 +266,24 @@ extern "C" {
|
|||||||
#include "SDL_utils_c.h"
|
#include "SDL_utils_c.h"
|
||||||
#include "SDL_hashtable.h"
|
#include "SDL_hashtable.h"
|
||||||
|
|
||||||
|
/* SDL_ExitProcess is not declared in any public header, although
|
||||||
|
it is shared between some parts of SDL, because we don't want
|
||||||
|
anything calling it without an extremely good reason. */
|
||||||
|
#ifdef __WATCOMC__
|
||||||
|
extern void SDL_ExitProcess(int exitcode);
|
||||||
|
#pragma aux SDL_ExitProcess aborts;
|
||||||
|
#endif
|
||||||
|
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBC
|
||||||
|
#define SDL_abort() abort()
|
||||||
|
#else
|
||||||
|
#define SDL_abort() do { \
|
||||||
|
SDL_TriggerBreakpoint(); \
|
||||||
|
SDL_ExitProcess(42); \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PUSH_SDL_ERROR() \
|
#define PUSH_SDL_ERROR() \
|
||||||
{ char *_error = SDL_strdup(SDL_GetError());
|
{ char *_error = SDL_strdup(SDL_GetError());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user