aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/module.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/config/module.hxx')
-rw-r--r--libbuild2/config/module.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/config/module.hxx b/libbuild2/config/module.hxx
index 4b9d4f2..296dec5 100644
--- a/libbuild2/config/module.hxx
+++ b/libbuild2/config/module.hxx
@@ -62,7 +62,7 @@ namespace build2
//
std::multimap<std::int32_t, const_iterator> order;
- iterator
+ pair<iterator, bool>
insert (string name, int prio = 0)
{
auto p (emplace (move (name), saved_variables ()));
@@ -70,7 +70,7 @@ namespace build2
if (p.second)
order.emplace (prio, p.first);
- return p.first;
+ return p;
}
};
@@ -78,10 +78,12 @@ namespace build2
{
config::saved_modules saved_modules;
- void
+ // Return true if variable/module were newly inserted.
+ //
+ bool
save_variable (const variable&, uint64_t flags = 0);
- void
+ bool
save_module (const char* name, int prio = 0);
static const string name;