aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-07-23 10:49:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-07-23 10:49:37 +0200
commit7292c24ba3e4c0016e40466239437fe5819c47de (patch)
treefa066913ee9d5a8aea7d26bfd02ffa691dd4e1a4 /libbuild2/variable.cxx
parent4c628d939413bb722a6819d8e3798d79051619ce (diff)
Reserve variable names/components that start with underscore to build2 core
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index 1855f3e..d84945f 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -1553,7 +1553,7 @@ namespace build2
}
}
- variable& variable_pool::
+ pair<variable&, bool> variable_pool::
insert (string n,
const build2::value_type* t,
const variable_visibility* v,
@@ -1619,7 +1619,7 @@ namespace build2
update (var, pt, pv, po); // Not changing the key.
}
- return var;
+ return pair<variable&, bool> (var, r.second);
}
const variable& variable_pool::
@@ -1631,7 +1631,7 @@ namespace build2
var.type,
&var.visibility,
nullptr /* override */,
- false /* pattern */));
+ false /* pattern */).first);
assert (a.overrides == nullptr);