aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-19 10:27:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-19 10:27:14 +0200
commitbc582eb32448bf7eb61ab3b1c76597885c8ec02a (patch)
tree64ed4501fac82b25e03e9f59a2d5a91a6450bcbc /libbuild2/scope.hxx
parent7a995b778ab86c8ae63ba8f86950fd25e3ab5162 (diff)
Fix several issues in build system module importation logicmodule-import
Diffstat (limited to 'libbuild2/scope.hxx')
-rw-r--r--libbuild2/scope.hxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx
index 0eabd17..5578d0c 100644
--- a/libbuild2/scope.hxx
+++ b/libbuild2/scope.hxx
@@ -510,9 +510,10 @@ namespace build2
build2::meta_operations meta_operations;
build2::operations operations;
- // Modules loaded by this project.
+ // Modules imported/loaded by this project.
//
- module_map modules;
+ module_import_map imported_modules;
+ module_state_map loaded_modules;
// Buildfiles already loaded for this project.
//
@@ -591,21 +592,21 @@ namespace build2
bool
find_module (const string& name) const
{
- return root_extra->modules.find_module<module> (name) != nullptr;
+ return root_extra->loaded_modules.find_module<module> (name) != nullptr;
}
template <typename T>
T*
find_module (const string& name)
{
- return root_extra->modules.find_module<T> (name);
+ return root_extra->loaded_modules.find_module<T> (name);
}
template <typename T>
const T*
find_module (const string& name) const
{
- return root_extra->modules.find_module<T> (name);
+ return root_extra->loaded_modules.find_module<T> (name);
}
public: