From 457f65414031f45174f3c35230a0c0e1de88b51a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Apr 2022 04:39:45 +0200 Subject: Switch to using std::function for target::data_pad --- libbuild2/config/functions.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbuild2/config/functions.cxx') diff --git a/libbuild2/config/functions.cxx b/libbuild2/config/functions.cxx index 398512c..3d35a01 100644 --- a/libbuild2/config/functions.cxx +++ b/libbuild2/config/functions.cxx @@ -40,7 +40,10 @@ namespace build2 if (s == nullptr) fail << "config.save() called out of project" << endf; - module* mod (s->find_module (module::name)); + // See save_config() for details. + // + assert (s->ctx.phase == run_phase::load); + module* mod (s->rw ().find_module (module::name)); if (mod == nullptr) fail << "config.save() called without config module"; -- cgit v1.1