change order of env_set() args

It's bugged me forever that the scope is the second arg to `env_get()`
but not `env_set()`. And since I'll be introducing some helper functions
that wrap `env_set()` now is a good time to change the order of its
arguments.
This commit is contained in:
Kurtis Rader
2017-08-10 17:46:08 -07:00
parent fa4cf77aff
commit 58b604c5ba
15 changed files with 65 additions and 65 deletions

View File

@@ -340,7 +340,7 @@ void function_prepare_environment(const wcstring &name, const wchar_t *const *ar
const wchar_t *const *arg;
size_t i;
for (i = 0, arg = argv; i < named_arguments.size(); i++) {
env_set(named_arguments.at(i).c_str(), *arg, ENV_LOCAL | ENV_USER);
env_set(named_arguments.at(i).c_str(), ENV_LOCAL | ENV_USER, *arg);
if (*arg) arg++;
}
@@ -349,6 +349,6 @@ void function_prepare_environment(const wcstring &name, const wchar_t *const *ar
for (std::map<wcstring, env_var_t>::const_iterator it = inherited_vars.begin(),
end = inherited_vars.end();
it != end; ++it) {
env_set(it->first, it->second.missing() ? NULL : it->second.c_str(), ENV_LOCAL | ENV_USER);
env_set(it->first, ENV_LOCAL | ENV_USER, it->second.missing() ? NULL : it->second.c_str());
}
}