SDL_UINT64_C(3)

πŸ’– SDL_UINT64_C(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, this one's all about SDL_UINT64_C and honestly? it's a tiny little macro doing the lord's work. let's get into it 🫢


✨ NAME ✨

SDL_UINT64_C β€” appends the 64 bit integer suffix to an unsigned integer literal. that's it. that's the whole job. and it slays at it πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

#define SDL_UINT64_C(c)  c ## ULL /* or whatever the current compiler uses. */
yes bestie the comment is literally in the macro itself β€” or whatever the current compiler uses. iconic. no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” some compilers out here really be believing that an integer literal bigger than 0xFFFFFFFF is overflowing a 32-bit value 😭 like girl it's not, calm down. and that's exactly the drama this macro fixes.

use SDL_UINT64_C(0xFFFFFFFF1) instead of writing 0xFFFFFFFF1 all by itself, and your compiler will finally understand the vibe check βœ…


πŸ‘‘ AVAILABILITY πŸ‘‘

this macro is available since SDL 3.2.0 ✨ so if you're on anything older… bestie. upgrade. it's giving ancient πŸ™ˆ


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page!! short, sweet, and absolutely ate πŸ’… if you ever see a big unsigned literal getting misread as 32-bit, you know exactly who to call.

🌈 this has been a Simple Directmedia Layer production, brought to you by SDL 3.4.18 β€” mwah, take care of yourselves, hydrate, and remember to wrap your literals 🌈 πŸ’–βœ¨

πŸ“¦ where this page comes from