From 34cc74df52ed129bffeb7b6fcf11f05c222550ba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 27 Jun 2016 15:27:14 +0200 Subject: Get rid of extern "C" in module boot()/init() We will have a separate (extern "C") register() function that will return the pointers to these two. This way we can still throw exceptions from boot() and init(). --- build2/config/module | 22 +++++++++++----------- build2/config/module.cxx | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'build2/config') diff --git a/build2/config/module b/build2/config/module index 912ab57..adc9b05 100644 --- a/build2/config/module +++ b/build2/config/module @@ -28,17 +28,17 @@ namespace build2 static const string name; }; - extern "C" void - config_boot (scope&, const location&, unique_ptr&); - - extern "C" bool - config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); + void + boot (scope&, const location&, unique_ptr&); + + bool + init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); } } diff --git a/build2/config/module.cxx b/build2/config/module.cxx index 70301c5..4f4064f 100644 --- a/build2/config/module.cxx +++ b/build2/config/module.cxx @@ -27,8 +27,8 @@ namespace build2 // static const path config_file ("build/config.build"); - extern "C" void - config_boot (scope& root, const location&, unique_ptr&) + void + boot (scope& root, const location&, unique_ptr&) { tracer trace ("config::boot"); @@ -53,14 +53,14 @@ namespace build2 source (f, root, root); } - extern "C" bool - config_init (scope& root, - scope&, - const location& l, - unique_ptr& mod, - bool first, - bool, - const variable_map& config_hints) + bool + init (scope& root, + scope&, + const location& l, + unique_ptr& mod, + bool first, + bool, + const variable_map& config_hints) { tracer trace ("config::init"); -- cgit v1.1