Refactor so that make_method_bindable also accepts free functions now
This commit is contained in:
parent
c6d01f745a
commit
addb48822f
7 changed files with 96 additions and 37 deletions
|
@ -66,7 +66,7 @@ int main() {
|
|||
|
||||
wren::DefConfiguration config;
|
||||
wren::VM vm(&config, nullptr);
|
||||
vm.callback_manager().add_callback(true, "main", "User", "get_env(_)", &user_get_env);
|
||||
vm.callback_manager().add_callback(true, "main", "User", "get_env(_)", [](){return &user_get_env;});
|
||||
|
||||
vm.interpret("main", g_script);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue