aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-10 18:22:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-10 18:22:31 +0200
commit19af3f6b0873a92582e4787a87a6f14df53ff6ae (patch)
tree7545e80d9348eb7808e1c894cd111ab46cc8a9a5 /libbuild2/config/operation.cxx
parent9f95a23eae04680559a9cb943fdfaa00f52cd66e (diff)
Preparatory work for public/private variable distinction
We still always use the public var_pool from context but where required, all access now goes through scope::var_pool().
Diffstat (limited to 'libbuild2/config/operation.cxx')
-rw-r--r--libbuild2/config/operation.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx
index 5edb610..c6fea07 100644
--- a/libbuild2/config/operation.cxx
+++ b/libbuild2/config/operation.cxx
@@ -207,6 +207,8 @@ namespace build2
// saved according to config.config.persist potentially warning if the
// variable would otherwise be dropped.
//
+ // Note: go straight for the public variable pool.
+ //
auto& vp (ctx.var_pool);
for (auto p (rs.vars.lookup_namespace ("config"));
@@ -636,6 +638,8 @@ namespace build2
}
}
+ // Note: go straight for the public variable pool.
+ //
value& v (rs.assign (*rs.ctx.var_pool.find ("config.config.environment")));
// Note that setting new config.config.environment value invalidates the
@@ -910,6 +914,8 @@ namespace build2
context& ctx (fwd ? ts[0].as<scope> ().ctx : ts[0].as<target> ().ctx);
+ // Note: go straight for the public variable pool.
+ //
const variable* c_s (ctx.var_pool.find ("config.config.save"));
if (c_s->overrides == nullptr)
@@ -1276,6 +1282,8 @@ namespace build2
// Add the default config.config.persist value unless there is a custom
// one (specified as a command line override).
//
+ // Note: go straight for the public variable pool.
+ //
const variable& var (*ctx.var_pool.find ("config.config.persist"));
if (!rs[var].defined ())