Add support for foreign constructor overload

Make vm_fun.hpp fun again by moving setters/getters
into a separate header.
Add new make_overloaded_foreign_class(), but code is still
untested and it's a work in progress at this point.
Interface will change.
This commit is contained in:
King_DuckZ 2022-05-15 15:35:25 +02:00
commit 9921e59a6b
5 changed files with 299 additions and 177 deletions

View file

@ -92,7 +92,7 @@ namespace wren {
auto it_found = m_classes.find(TempClassName{module_name, class_name});
if (m_classes.cend() != it_found)
return (*it_found->second)();
return it_found->second();
else
return {nullptr, nullptr};
}