aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/script.hxx
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/build/script/script.hxx
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/build/script/script.hxx')
-rw-r--r--libbuild2/build/script/script.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/build/script/script.hxx b/libbuild2/build/script/script.hxx
index f8df204..2c5e6e0 100644
--- a/libbuild2/build/script/script.hxx
+++ b/libbuild2/build/script/script.hxx
@@ -89,10 +89,12 @@ namespace build2
class environment: public build2::script::environment
{
public:
+ using scope_type = build2::scope;
using target_type = build2::target;
environment (action,
const target_type&,
+ const scope_type&,
bool temp_dir,
const optional<timestamp>& deadline = nullopt);
@@ -113,11 +115,12 @@ namespace build2
environment& operator= (const environment&) = delete;
public:
- // Primary target this environment is for.
+ // Primary target this environment is for and its base scope;
//
const target_type& target;
+ const scope_type& scope;
- // Script-local variable pool and map.
+ // Script-private variable pool and map.
//
// Note that it may be tempting to reuse the rule-specific variables
// for this but they should not be modified during execution (i.e.,