aboutsummaryrefslogtreecommitdiff
path: root/build2/file
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-01 16:36:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commite3e597180487328a54721e2afb95e33ed853d586 (patch)
tree89d59f482d41eb37a90f97b0dd55c2e878e4800b /build2/file
parent1dd17210b76d544a04fc6b4f3c98162ae9718102 (diff)
Pass const scope& where modification should not happen
Diffstat (limited to 'build2/file')
-rw-r--r--build2/file10
1 files changed, 6 insertions, 4 deletions
diff --git a/build2/file b/build2/file
index adfd884..696c5d7 100644
--- a/build2/file
+++ b/build2/file
@@ -70,10 +70,11 @@ namespace build2
source_once (scope& root, scope& base, const path&, scope& once);
// Create project's root scope. Only set the src_root variable if the
- // passed src_root value is not empty.
+ // passed src_root value is not empty. The scope argument is only used
+ // as proof of lock.
//
scope&
- create_root (const dir_path& out_root, const dir_path& src_root);
+ create_root (scope&, const dir_path& out_root, const dir_path& src_root);
// Setup root scope. Note that it assume the src_root variable
// has already been set.
@@ -140,10 +141,11 @@ namespace build2
// Extract the specified variable value from a buildfile. It is expected to
// be the first non-comment line and not to rely on any variable expansion
// other than those from the global scope or any variable overrides. Return
- // an indication of whether the variable was found.
+ // an indication of whether the variable was found. The scope is only used
+ // as proof of lock (though we don't modify anything).
//
pair<value, bool>
- extract_variable (const path&, const variable&);
+ extract_variable (scope&, const path&, const variable&);
// Import has two phases: the first is triggered by the import
// directive in the buildfile. It will try to find and load the