mirror of
https://github.com/textmate/textmate.git
synced 2026-01-20 20:27:59 -05:00
Add set_basic_environment
This is in cases where we don’t want the “clean” environment setup by default.
This commit is contained in:
@@ -40,10 +40,20 @@ namespace oak
|
||||
return res;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> const& basic_environment ()
|
||||
std::map<std::string, std::string>& rw_environment ()
|
||||
{
|
||||
static std::map<std::string, std::string> const* environment = new std::map<std::string, std::string>(setup_basic_environment());
|
||||
static std::map<std::string, std::string>* environment = new std::map<std::string, std::string>(setup_basic_environment());
|
||||
return *environment;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> const& basic_environment ()
|
||||
{
|
||||
return rw_environment();
|
||||
}
|
||||
|
||||
void set_basic_environment (std::map<std::string, std::string> const& newEnvironment)
|
||||
{
|
||||
rw_environment() = newEnvironment;
|
||||
}
|
||||
|
||||
} /* io */
|
||||
@@ -6,6 +6,7 @@
|
||||
namespace oak
|
||||
{
|
||||
PUBLIC std::map<std::string, std::string> const& basic_environment ();
|
||||
PUBLIC void set_basic_environment (std::map<std::string, std::string> const& newEnvironment);
|
||||
|
||||
} /* io */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user