SDL_FUNCTION(3)
π SDL_FUNCTION π
okay bestie, welcome to the SDL_FUNCTION page from the SDL3 functions manual, and honestly? it's a short one but it EATS. it's giving "tiny but mighty" fr fr β¨
πΈ NAME πΈ
SDL_FUNCTION β a constant that contains the current function being compiled. yes literally just that, it's the little macro that knows where it is at all times, main character energy tbh π
π SYNOPSIS π
#include <SDL3/SDL_assert.h>
#define SDL_FUNCTION __FUNCTION__
so you pull it in with that include, and it's defined as __FUNCTION__. that's it, that's the whole vibe π¦
β¨ DESCRIPTION β¨
it's a macro that hands you the name of the function currently being compiled. lowkey iconic for debug messages and asserts and stuff.
and here's the tea: if SDL can't figure out how your compiler reports this, it will use "???". like, it just shrugs and goes "???" β no cap, that's the actual fallback string π
heads up bestie: that"???"is not a placeholder you get to interpret, it's literally what you'll see. so if your function name shows up as???, that's SDL being honest about not knowing, not you breaking anything π
π AVAILABILITY π
this macro is available since SDL 3.2.0. so if you're on something older, sorry babe, it's not there yet π
and that's the whole page!! short, sweet, slayed. go forth and log your function names, you got this π«Ά
sign-off time: this lil page comes from the Simple Directmedia Layer crew, straight out of SDL 3.4.18 β mwah, sending love, bye bestie π πΈ
π¦ 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