Refactor so that make_method_bindable also accepts free functions now

This commit is contained in:
King_DuckZ 2022-05-19 01:06:09 +02:00
commit addb48822f
7 changed files with 96 additions and 37 deletions

View file

@ -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);