MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / Unsetenv

Function Unsetenv

src/OpenColorIO/Platform.cpp:123–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void Unsetenv(const char * name)
124{
125 if (!name || !*name)
126 {
127 return;
128 }
129
130#ifdef _WIN32
131
132#ifdef UNICODE
133 // Note that the Windows _putenv_s() removes the env. variable if the value is empty.
134 _wputenv_s(Utf8ToUtf16(name).c_str(), L"");
135#else
136 _putenv_s(name, "");
137#endif
138
139#else
140 ::unsetenv(name);
141#endif
142}
143
144bool isEnvPresent(const char * name)
145{

Callers 8

UnsetEnvVariableFunction · 0.85
OCIO_ADD_TESTFunction · 0.85
~InactiveCSGuardMethod · 0.85
OCIO_ADD_TESTFunction · 0.85
~GuardMethod · 0.85
~GuardMethod · 0.85
OCIO_ADD_TESTFunction · 0.85

Calls 1

Utf8ToUtf16Function · 0.85

Tested by 7

OCIO_ADD_TESTFunction · 0.68
~InactiveCSGuardMethod · 0.68
OCIO_ADD_TESTFunction · 0.68
~GuardMethod · 0.68
~GuardMethod · 0.68
OCIO_ADD_TESTFunction · 0.68