new object creation interface

This commit is contained in:
IlyaShurupov 2024-03-25 10:25:25 +03:00 committed by Ilya Shurupov
parent ca1ae75b07
commit cf3f8dbc9c
23 changed files with 103 additions and 84 deletions

View file

@ -60,7 +60,7 @@ void MethodObject::UnInitialize() { obj::ScriptSection::uninitialize(); }
void MethodObject::compile() { Compile(this); }
MethodObject* MethodObject::create(const std::string& script) {
auto out = (MethodObject*) NDO->create(MethodObject::TypeData.name);
auto out = objects_api::create<MethodObject>();
out->mScript->mReadable->val = script;
out->compile();
return out;