aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-01-27 09:07:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-01-27 09:07:09 +0200
commit2169f0e960c6e2b94518c03e6eb0406908b96e65 (patch)
tree73cfda5d0c7aa38c74104cca89931045db37892e /libbuild2/config
parent1abc10223b37d9ead3454a06e176b4b65370a2be (diff)
Improve module loading API
Diffstat (limited to 'libbuild2/config')
-rw-r--r--libbuild2/config/operation.cxx4
-rw-r--r--libbuild2/config/utility.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx
index 9f241e8..81b99be 100644
--- a/libbuild2/config/operation.cxx
+++ b/libbuild2/config/operation.cxx
@@ -172,7 +172,7 @@ namespace build2
// saved) and this function can be called from a buildfile (probably
// only during serial execution but still).
//
- module* mod (rs.lookup_module<module> (module::name));
+ module* mod (rs.find_module<module> (module::name));
if (mod == nullptr)
fail (on) << "no configuration information available during this "
@@ -336,7 +336,7 @@ namespace build2
{
// Find the config module (might not be there).
//
- if (auto* m = r->lookup_module<const module> (module::name))
+ if (auto* m = r->find_module<const module> (module::name))
{
// Find the corresponding saved module.
//
diff --git a/libbuild2/config/utility.cxx b/libbuild2/config/utility.cxx
index 291bf0c..34220f8 100644
--- a/libbuild2/config/utility.cxx
+++ b/libbuild2/config/utility.cxx
@@ -132,14 +132,14 @@ namespace build2
void
save_variable (scope& rs, const variable& var, uint64_t flags)
{
- if (module* m = rs.lookup_module<module> (module::name))
+ if (module* m = rs.find_module<module> (module::name))
m->save_variable (var, flags);
}
void
save_module (scope& rs, const char* name, int prio)
{
- if (module* m = rs.lookup_module<module> (module::name))
+ if (module* m = rs.find_module<module> (module::name))
m->save_module (name, prio);
}