From c4fcbad1cb603756dc4dac65392feb86be1a722d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 29 Jan 2020 09:19:06 +0200 Subject: Rename module_base to module, redo module boot/init argument passing --- libbuild2/test/init.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libbuild2/test/init.cxx') diff --git a/libbuild2/test/init.cxx b/libbuild2/test/init.cxx index 6a13990..ec95927 100644 --- a/libbuild2/test/init.cxx +++ b/libbuild2/test/init.cxx @@ -25,7 +25,7 @@ namespace build2 namespace test { bool - boot (scope& rs, const location&, unique_ptr& mod) + boot (scope& rs, const location&, module_boot_extra& extra) { tracer trace ("test::boot"); @@ -116,7 +116,8 @@ namespace build2 v = cast (rs.ctx.global_scope["build.host"]); } - mod.reset (new module (move (d))); + extra.set_module (new module (move (d))); + return false; } @@ -124,10 +125,9 @@ namespace build2 init (scope& rs, scope&, const location& l, - unique_ptr& mod, bool first, bool, - const variable_map& config_hints) + module_init_extra& extra) { tracer trace ("test::init"); @@ -139,12 +139,10 @@ namespace build2 l5 ([&]{trace << "for " << rs;}); - assert (mod != nullptr); - module& m (static_cast (*mod)); + auto& m (extra.module_as ()); // Configure. // - assert (config_hints.empty ()); // We don't known any hints. // Adjust module priority so that the config.test.* values are saved at // the end of config.build. -- cgit v1.1