SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)


Never call this directly.


SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data,
                                    const char *func,
                                    const char *file, int line)
#ifdef __clang__
#if __has_feature(attribute_analyzer_noreturn)
/* Previous 'analyzer_noreturn' attribute tells Clang's static analysis that we're a custom assert function,
   and that the analyzer should assume the condition was always true past this
   SDL_assert test. */

/* Define the trigger breakpoint call used in asserts */
#ifndef SDL_AssertBreakpoint
#if defined(ANDROID) && defined(assert)
/* Define this as empty in case assert() is defined as SDL_assert */
#define SDL_AssertBreakpoint() 
#define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
#endif /* !SDL_AssertBreakpoint */

/* the do {} while(0) avoids dangling else problems:
    if (x) SDL_assert(y); else blah();

Function Parameters

data assert data structure
func function name
file file name
line line number

Return Value

Returns assert state


Use the SDL_assert* macros.


This function is available since SDL 3.0.0.


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.