#include "UserDataFunction.hpp" using namespace Porygon::Evaluation; namespace Porygon::UserData{ extern "C" { const EvalValue * CreateFunctionEvalValue(const Evaluation::EvalValue* (*func)(void*, const ScriptOptions*, const EvalValue* [], int ), void* obj) { auto opt = new UserDataFunction(func, obj); auto t = new GenericFunctionEvalValue(make_shared(), rand()); t->RegisterOption(opt); return t; } } }