Reordering things a bit
I currently have meson 0.52.1 and the default_library=static option has no effect for me, but I'm leaving it there in case this changes in the future.
This commit is contained in:
parent
a3dcb583d7
commit
640cc0e493
2 changed files with 13 additions and 4 deletions
|
@ -49,12 +49,12 @@ int main() {
|
|||
wren::DefConfiguration config;
|
||||
wren::VM vm(&config);
|
||||
vm.interpret("my_module", g_script);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
|
||||
|
||||
auto vars = variables<std::string, int>(vm, MN{"my_module", "name"}, MN{"my_module","number"});
|
||||
std::cout << "name = \"" << std::get<0>(vars) << "\", number = " << std::get<1>(vars) << '\n';
|
||||
const int sum = wren::call<int>(vm, {"my_module", "Math"}, "sum_params", MN{"my_module", "number"}, 90);
|
||||
std::cout << "wren method returned " << sum << " (expected " << std::get<1>(vars) + 90 << ")\n";
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue