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 π
SDL_SINT64_C(3)β the signed sibling, go say hi π«Ά
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
- 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