diff options
Diffstat (limited to 'libbuild2/config')
-rw-r--r-- | libbuild2/config/operation.cxx | 8 | ||||
-rw-r--r-- | libbuild2/config/utility.cxx | 6 | ||||
-rw-r--r-- | libbuild2/config/utility.hxx | 8 |
3 files changed, 21 insertions, 1 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 ()) diff --git a/libbuild2/config/utility.cxx b/libbuild2/config/utility.cxx index 2ce94ff..314de84 100644 --- a/libbuild2/config/utility.cxx +++ b/libbuild2/config/utility.cxx @@ -81,7 +81,9 @@ namespace build2 const string& n, initializer_list<const char*> ig) { - auto& vp (rs.var_pool ()); + // Note: go straight for the public variable pool. + // + auto& vp (rs.ctx.var_pool); // Search all outer scopes for any value in this namespace. // @@ -160,6 +162,8 @@ namespace build2 pair<variable_origin, lookup> origin (const scope& rs, const string& n) { + // Note: go straight for the public variable pool. + // const variable* var (rs.ctx.var_pool.find (n)); if (var == nullptr) diff --git a/libbuild2/config/utility.hxx b/libbuild2/config/utility.hxx index 72fe520..98d7ec0 100644 --- a/libbuild2/config/utility.hxx +++ b/libbuild2/config/utility.hxx @@ -271,6 +271,8 @@ namespace build2 const string& var, uint64_t save_flags = 0) { + // Note: go straight for the public variable pool. + // return lookup_config (rs, rs.ctx.var_pool[var], save_flags); } @@ -280,6 +282,8 @@ namespace build2 const string& var, uint64_t save_flags = 0) { + // Note: go straight for the public variable pool. + // return lookup_config (new_value, rs, rs.ctx.var_pool[var], save_flags); } @@ -367,6 +371,8 @@ namespace build2 uint64_t save_flags = 0, bool override = false) { + // Note: go straight for the public variable pool. + // return lookup_config (rs, rs.ctx.var_pool[var], std::forward<T> (default_value), // VC14 @@ -383,6 +389,8 @@ namespace build2 uint64_t save_flags = 0, bool override = false) { + // Note: go straight for the public variable pool. + // return lookup_config (new_value, rs, rs.ctx.var_pool[var], |