SDL_ASSERT_FILE(3)
π SDL_ASSERT_FILE π
okay bestie, welcome to the SDL_ASSERT_FILE page, part of the SDL3 functions manual. she's a macro, she's tiny, she's lowkey iconic, and she's here to spill the tea on which file is currently getting compiled. π
β¨ NAME β¨
SDL_ASSERT_FILE β a macro that reports the current file being compiled, for use in assertions. that's it. that's the whole job. and she does it flawlessly. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_assert.h>
#define SDL_ASSERT_FILE SDL_FILE
π¦ DESCRIPTION π¦
so here's the vibe: this macro is only defined if it isn't already defined. meaning if you, the main character, already rolled your own SDL_ASSERT_FILE before SDL got there, SDL is like "okay periodt, you got it, I'm not touching that." π«Ά
and that's on purpose, because sometimes you want to override it β maybe with something that doesn't provide path information at all, so that your build machine's info doesn't leak into public binaries. not the build machine doxxing itself in your release build, no ma'am. π
to do that, apps can just define this macro before including SDL_assert.h. and like, a very clean example: defining it to "" will make sure no source path information is included in asserts. chef's kiss. β¨
π AVAILABILITY π
this macro is available since SDL 3.4.0. she's a newer girlie, be nice to her. π
fr fr, if you're overriding this to "" for privacy reasons, that's not you being paranoid, that's you being smart. slay. π
and that's the whole page bestie, no cap. brought to you by the lovely folks at Simple Directmedia Layer β this is the SDL 3.4.18 edition, documented under the SDL3 functions manual, and yes the header and footer of the original both say SDL_ASSERT_FILE(3) because she's the moment. πβ¨π¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms