diff --git a/include/wrenpp/vm_fun.hpp b/include/wrenpp/vm_fun.hpp index fe0cd3b..1141b1b 100644 --- a/include/wrenpp/vm_fun.hpp +++ b/include/wrenpp/vm_fun.hpp @@ -32,9 +32,6 @@ #include namespace wren { - namespace detail { - } //namespace detail - template R call (VM& vm, const Handle& object, const Handle& method, const Args&... args); @@ -48,11 +45,11 @@ namespace wren { R call (VM& vm, const ModuleAndName& object, const char (&method)[N], const Args&... args); template - T* make_foreign_object(VM& vm, const ModuleAndName& mn, Args&&... args); + T* make_wren_object(VM& vm, const ModuleAndName& mn, Args&&... args); #if defined(WRENPP_WITH_NAME_GUESSING) template - T* make_foreign_object(VM& vm, const char* module, Args&&... args); + T* make_wren_object(VM& vm, const char* module, Args&&... args); #endif template @@ -172,7 +169,7 @@ namespace wren { } template - inline T* make_foreign_object(VM& vm, const ModuleAndName& mn, Args&&... args) { + inline T* make_wren_object(VM& vm, const ModuleAndName& mn, Args&&... args) { variable(vm, mn, 0); void* const mem = vm.set_slot_new_foreign(0, 0, sizeof(T)); T* const obj = new(mem) T{std::forward(args)...}; @@ -181,8 +178,8 @@ namespace wren { #if defined(WRENPP_WITH_NAME_GUESSING) template - inline T* make_foreign_object(VM& vm, const char* module, Args&&... args) { - return make_foreign_object( + inline T* make_wren_object(VM& vm, const char* module, Args&&... args) { + return make_wren_object( vm, ModuleAndName{module, guess_class_name()}, std::forward(args)...