SDL_ReportAssertion(3)

πŸŽ€ SDL_ReportAssertion πŸŽ€

okay bestie, gather round, we're looking at SDL_ReportAssertion(3) from the SDL3 FUNCTIONS collection πŸ’– and the vibe is literally: do not touch this one with your bare hands.


✨ NAME ✨

SDL_ReportAssertion β€” never call this directly, i'm so serious πŸ™ˆ


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_assert.h>

SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data,
                                const char *func,
                                const char *file, int line);

πŸ’… DESCRIPTION πŸ’…

so like… don't call this yourself, okay? 🫢 the SDL_assert macros are the ones you actually use instead. that's it. that's the whole tea. πŸ“

bestie if you're sitting here thinking "ooh should i call SDL_ReportAssertion directly?" β€” no. no you should not. use the SDL_assert macros. periodt. πŸ’…

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • data β€” the assert data structure, iconic little container of assertion lore πŸ“¦
  • func β€” the function name, like a lil name tag for where things went down 🏷️
  • file β€” the file name, so we know which file is the main character here πŸ“„
  • line β€” the line number, pinpointing exactly where the drama happened πŸ“

⭐ RETURN VALUE ⭐

returns the assert state, bestie β€” that's the answer it hands back to you ✨


🌈 THREAD SAFETY 🌈

it's giving fully thread-safe πŸ’š you can call this function from any thread and it will not be messy about it. no cap.


πŸ‘‘ AVAILABILITY πŸ‘‘

this one has been around since SDL 3.2.0 ⭐ so if you're on anything older, she's not there yet, sorry babe 😭


xoxo, this was your girl SDL_ReportAssertion(3) πŸ’– brought to you by Simple Directmedia Layer and SDL 3.4.18 β€” slay responsibly, and remember: use the SDL_assert macros instead πŸ¦„βœ¨πŸŽ€

πŸ“¦ where this page comes from