Add Lua method to show system env

`for v in ARDOUR.LuaAPI.env():iter() do print(v) end`
This commit is contained in:
Robin Gareus 2022-12-07 00:27:12 +01:00
parent 0abbe651ea
commit 85a1c463e5
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 26 additions and 0 deletions

View file

@ -552,6 +552,28 @@ ARDOUR::LuaAPI::segfault ()
*p = 0;
}
#ifdef PLATFORM_WINDOWS
std::vector<std::string>
ARDOUR::LuaAPI::env ()
{
std::vector<std::string> rv;
return rv;
}
#else
extern char **environ;
std::vector<std::string>
ARDOUR::LuaAPI::env ()
{
std::vector<std::string> rv;
for (int i = 0; environ[i]; ++i) {
rv.push_back (environ[i]);
}
return rv;
}
#endif
int
ARDOUR::LuaOSC::Address::send (lua_State *L)
{