aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/version/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-01-29 09:19:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-01-29 09:19:06 +0200
commitc4fcbad1cb603756dc4dac65392feb86be1a722d (patch)
treeda9c9c2278c63d20237a7178fde450d7472a59c9 /libbuild2/version/init.cxx
parentccb417a7c1456427b76914e8a11ca87b4926eeb3 (diff)
Rename module_base to module, redo module boot/init argument passing
Diffstat (limited to 'libbuild2/version/init.cxx')
-rw-r--r--libbuild2/version/init.cxx20
1 files changed, 10 insertions, 10 deletions
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<module_base>& 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<project_name> (rs.vars[ctx.var_project]),
- move (v),
- committed,
- rewritten,
- move (ds)));
+ extra.set_module (
+ new module (cast<project_name> (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<module_base>& 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<module&> (*mod));
+ auto& m (extra.module_as<module> ());
const standard_version& v (m.version);
// If the dist module is used, set its dist.package and register the