mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-29 06:01:16 -03:00
Switch parser_t to hold its variables via shared_ptr
Preparation for variable stacks with finite lifetimes.
This commit is contained in:
@@ -1283,8 +1283,9 @@ env_stack_t &env_stack_t::globals() {
|
||||
return s_globals;
|
||||
}
|
||||
|
||||
env_stack_t &env_stack_t::principal() {
|
||||
static env_stack_t s_principal(env_stack_impl_t::create());
|
||||
const std::shared_ptr<env_stack_t> &env_stack_t::principal_ref() {
|
||||
static const std::shared_ptr<env_stack_t> s_principal{
|
||||
new env_stack_t(env_stack_impl_t::create())};
|
||||
return s_principal;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user