Size: 1117
Comment: Added note about constness.
|
← Revision 6 as of 2015-02-21 10:24:23 ⇥
Size: 1115
Comment: Updated signature and example.
|
Deletions are marked like this. | Additions are marked like this. |
Line 11: | Line 11: |
const SDL_assert_data* SDL_GetAssertionReport(void) | const SDL_AssertData* SDL_GetAssertionReport(void) |
Line 20: | Line 20: |
const SDL_assert_data *item = SDL_GetAssertionReport(); | const SDL_AssertData *item = SDL_GetAssertionReport(); |
SDL_GetAssertionReport
Use this function to get a list of all assertion failures.
Syntax
const SDL_AssertData* SDL_GetAssertionReport(void)
Return Value
Returns a list of all failed assertions or NULL if the list is empty. This memory should not be modified or freed by the application.
Code Examples
The proper way to examine this data looks something like this:
const SDL_AssertData *item = SDL_GetAssertionReport();
while (item) {
printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
item->condition, item->function, item->filename,
item->linenum, item->trigger_count,
item->always_ignore ? "yes" : "no");
item = item->next;
}
Remarks
This function gets all assertions triggered since the last call to SDL_ResetAssertionReport(), or the start of the program.