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/version/init.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libbuild2/version/init.cxx') diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx index f69e416..d07198c 100644 --- a/libbuild2/version/init.cxx +++ b/libbuild2/version/init.cxx @@ -32,7 +32,7 @@ namespace build2 static const manifest_install_rule manifest_install_rule_; bool - boot (scope& rs, const location& l, unique_ptr& mod) + boot (scope& rs, const location& l, module_boot_extra& extra) { tracer trace ("version::boot"); l5 ([&]{trace << "for " << rs;}); @@ -271,13 +271,14 @@ namespace build2 set ("version.revision", uint64_t (v.revision)); - // Create the module. + // Create the module instance. // - mod.reset (new module (cast (rs.vars[ctx.var_project]), - move (v), - committed, - rewritten, - move (ds))); + extra.set_module ( + new module (cast (rs.vars[ctx.var_project]), + move (v), + committed, + rewritten, + move (ds))); return true; // Init first (dist.package, etc). } @@ -289,10 +290,9 @@ namespace build2 init (scope& rs, scope&, const location& l, - unique_ptr& mod, bool first, bool, - const variable_map&) + module_init_extra& extra) { tracer trace ("version::init"); @@ -305,7 +305,7 @@ namespace build2 // load_module (rs, rs, "in.base", l); - module& m (static_cast (*mod)); + auto& m (extra.module_as ()); const standard_version& v (m.version); // If the dist module is used, set its dist.package and register the -- cgit v1.1