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

◆ safe_getenv()

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

Definition at line 14 of file HostEnvironment.cpp.

15{
16#ifdef MAYAFLUX_PLATFORM_WINDOWS
17 char* value = nullptr;
18 size_t len = 0;
19 if (_dupenv_s(&value, &len, var) == 0 && value != nullptr) {
20 std::string result(value);
21 free(value);
22 return result;
23 }
24 return "";
25#else
26 const char* value = std::getenv(var);
27 return value ? std::string(value) : "";
28#endif
29}

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

+ Here is the caller graph for this function: