diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-10 18:22:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-10 18:22:31 +0200 |
commit | 19af3f6b0873a92582e4787a87a6f14df53ff6ae (patch) | |
tree | 7545e80d9348eb7808e1c894cd111ab46cc8a9a5 /libbuild2/context.cxx | |
parent | 9f95a23eae04680559a9cb943fdfaa00f52cd66e (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/context.cxx')
-rw-r--r-- | libbuild2/context.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index a7df959..e44d79f 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -52,7 +52,10 @@ namespace build2 variable_override_cache global_override_cache; strings global_var_overrides; - data (context& c): scopes (c), targets (c), var_pool (&c /* global */) {} + data (context& c) + : scopes (c), + targets (c), + var_pool (&c /* shared */, nullptr /* outer */) {} }; context:: @@ -479,6 +482,7 @@ namespace build2 unique_ptr<variable> p ( new variable { n + '.' + to_string (i + 1) + '.' + k, + &vp /* owner */, nullptr /* aliases */, nullptr /* type */, nullptr /* overrides */, @@ -708,7 +712,7 @@ namespace build2 auto find_ovar = [this] (const char* n) { - const variable* v (var_pool.find (n)); + const variable* v (var_pool.find (n)); // @@ TMP: pub/prv vars // The operation variable should have prerequisite or target visibility. // |