Add SDL_internal macro for internal use

This commit is contained in:
Anonymous Maarten
2025-09-17 19:24:02 +02:00
committed by Anonymous Maarten
parent 566e7c2379
commit a7739ceccb

View File

@@ -266,6 +266,24 @@ extern "C" {
#include "SDL_utils_c.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() \
{ char *_error = SDL_strdup(SDL_GetError());