From 19af3f6b0873a92582e4787a87a6f14df53ff6ae Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 10 Oct 2022 18:22:31 +0200 Subject: 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(). --- libbuild2/config/utility.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libbuild2/config/utility.cxx') 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 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 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) -- cgit v1.1