From bc582eb32448bf7eb61ab3b1c76597885c8ec02a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 19 Apr 2023 10:27:14 +0200 Subject: Fix several issues in build system module importation logic --- libbuild2/scope.hxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libbuild2/scope.hxx') 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 (name) != nullptr; + return root_extra->loaded_modules.find_module (name) != nullptr; } template T* find_module (const string& name) { - return root_extra->modules.find_module (name); + return root_extra->loaded_modules.find_module (name); } template const T* find_module (const string& name) const { - return root_extra->modules.find_module (name); + return root_extra->loaded_modules.find_module (name); } public: -- cgit v1.1