SDL_unsetenv_unsafe(3)

πŸ’– SDL_unsetenv_unsafe(3) πŸ’–

okay bestie, welcome to the SDL3 functions era of the manual pages, we're doing SDL_unsetenv_unsafe today and honestly? it's giving "delete but make it spicy" πŸŽ€


✨ NAME ✨

SDL_unsetenv_unsafe β€” clear a variable from the environment. yeah. that's the whole job. she removes one (1) env var and she does not overthink it πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

int SDL_unsetenv_unsafe(const char *name);

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • name β€” the name of the variable you want to unset. like, the actual string of the variable's name. that's it, that's the vibe 🫢

⭐ RETURN VALUE ⭐

  • 0 β€” slay, it worked, success πŸ’–
  • -1 β€” nope, error, something went wrong 😭

πŸ’€ THREAD SAFETY πŸ’€

not thread safe. like, do NOT be out here calling this from multiple threads at once, that's main character behavior in the worst way πŸ™ˆ

the page literally says: consider using SDL_UnsetEnvironmentVariable() instead. so bestie, if you're threading, go there instead, fr fr.


🌈 AVAILABILITY 🌈

this one's been around since SDL 3.2.0. vintage-ish. iconic. πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, no cap ✨ this was Simple Directmedia Layer, SDL 3.4.18, and yes the function header up top is SDL_unsetenv_unsafe(3) so you know exactly where you are. bye bestie, go unset some variables responsibly πŸ’œπŸŒΈ

πŸ“¦ where this page comes from