MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ safe_getenv()

std::string MayaFlux::Platform::safe_getenv ( const char *  var)

Definition at line 20 of file HostEnvironment.cpp.

21{
22#ifdef MAYAFLUX_PLATFORM_WINDOWS
23 char* value = nullptr;
24 size_t len = 0;
25 if (_dupenv_s(&value, &len, var) == 0 && value != nullptr) {
26 std::string result(value);
27 free(value);
28 return result;
29 }
30 return "";
31#else
32 const char* value = std::getenv(var);
33 return value ? std::string(value) : "";
34#endif
35}

Referenced by MayaFlux::Platform::SystemConfig::get_unix_library_paths().

+ Here is the caller graph for this function: