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/cc/pkgconfig.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbuild2/cc/pkgconfig.cxx') diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index 5efab0d..6023b45 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -802,6 +802,11 @@ namespace build2 context& ctx (t.ctx); + // These should be public (qualified) variables so go straight for + // the public variable pool. + // + auto& vp (ctx.var_pool.rw ()); // Load phase. + optional ver; optional pfx; @@ -865,7 +870,6 @@ namespace build2 : name (move (s))); } - auto& vp (ctx.var_pool.rw ()); // Load phase. const variable& var (vp.insert (move (vn))); value& v (t.assign (var)); @@ -1974,6 +1978,8 @@ namespace build2 // if (la) { + // Note: go straight for the public variable pool. + // if (cast_false (l.lookup_original ( ctx.var_pool["bin.whole"], true /* target_only */).first)) -- cgit v1.1