Skip to content

Commit f906c52

Browse files
committed
SDL_assert: remove old naming convention (see #6783)
1 parent 2905b6d commit f906c52

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/SDL_assert.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
/* The size of the stack buffer to use for rendering assert messages. */
4141
#define SDL_MAX_ASSERT_MESSAGE_STACK 256
4242

43-
static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, void *userdata);
43+
static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, void *userdata);
4444

4545
/*
4646
* We keep all triggered assertions in a singly-linked list so we can
4747
* generate a report later.
4848
*/
49-
static SDL_assert_data *triggered_assertions = NULL;
49+
static SDL_AssertData *triggered_assertions = NULL;
5050

5151
#ifndef SDL_THREADS_DISABLED
5252
static SDL_mutex *assertion_mutex = NULL;
@@ -67,7 +67,7 @@ static void debug_print(const char *fmt, ...)
6767
va_end(ap);
6868
}
6969

70-
static void SDL_AddAssertionToReport(SDL_assert_data *data)
70+
static void SDL_AddAssertionToReport(SDL_AssertData *data)
7171
{
7272
/* (data) is always a static struct defined with the assert macros, so
7373
we don't have to worry about copying or allocating them. */
@@ -84,7 +84,7 @@ static void SDL_AddAssertionToReport(SDL_assert_data *data)
8484
#define ENDLINE "\n"
8585
#endif
8686

87-
static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_assert_data *data)
87+
static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_AssertData *data)
8888
{
8989
return SDL_snprintf(buf, buf_len,
9090
"Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE " '%s'",
@@ -95,7 +95,7 @@ static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_assert_d
9595

9696
static void SDL_GenerateAssertionReport(void)
9797
{
98-
const SDL_assert_data *item = triggered_assertions;
98+
const SDL_AssertData *item = triggered_assertions;
9999

100100
/* only do this if the app hasn't assigned an assertion handler. */
101101
if ((item != NULL) && (assertion_handler != SDL_PromptAssertion)) {
@@ -139,10 +139,10 @@ static SDL_NORETURN void SDL_AbortAssertion(void)
139139
SDL_ExitProcess(42);
140140
}
141141

142-
static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
142+
static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, void *userdata)
143143
{
144144
const char *envr;
145-
SDL_assert_state state = SDL_ASSERTION_ABORT;
145+
SDL_AssertState state = SDL_ASSERTION_ABORT;
146146
SDL_Window *window;
147147
SDL_MessageBoxData messagebox;
148148
SDL_MessageBoxButtonData buttons[] = {
@@ -235,7 +235,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
235235
if (selected == -1) {
236236
state = SDL_ASSERTION_IGNORE;
237237
} else {
238-
state = (SDL_assert_state)selected;
238+
state = (SDL_AssertState)selected;
239239
}
240240
} else {
241241
#if defined(__EMSCRIPTEN__)
@@ -318,11 +318,11 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
318318
return state;
319319
}
320320

321-
SDL_assert_state
322-
SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file,
321+
SDL_AssertState
322+
SDL_ReportAssertion(SDL_AssertData *data, const char *func, const char *file,
323323
int line)
324324
{
325-
SDL_assert_state state = SDL_ASSERTION_IGNORE;
325+
SDL_AssertState state = SDL_ASSERTION_IGNORE;
326326
static int assertion_running = 0;
327327

328328
#ifndef SDL_THREADS_DISABLED
@@ -416,17 +416,17 @@ void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata)
416416
}
417417
}
418418

419-
const SDL_assert_data *SDL_GetAssertionReport(void)
419+
const SDL_AssertData *SDL_GetAssertionReport(void)
420420
{
421421
return triggered_assertions;
422422
}
423423

424424
void SDL_ResetAssertionReport(void)
425425
{
426-
SDL_assert_data *next = NULL;
427-
SDL_assert_data *item;
426+
SDL_AssertData *next = NULL;
427+
SDL_AssertData *item;
428428
for (item = triggered_assertions; item != NULL; item = next) {
429-
next = (SDL_assert_data *)item->next;
429+
next = (SDL_AssertData *)item->next;
430430
item->always_ignore = SDL_FALSE;
431431
item->trigger_count = 0;
432432
item->next = NULL;

0 commit comments

Comments
 (0)