Setup for making script options non global if desired
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-08-10 11:55:45 +02:00
parent bbda668b3e
commit 2f912afe92
13 changed files with 105 additions and 76 deletions

View File

@@ -5,7 +5,8 @@ using namespace Porygon::Evaluation;
namespace Porygon::UserData{
extern "C" {
const EvalValue * CreateFunctionEvalValue(const Evaluation::EvalValue* (*func)(void* , const EvalValue* [], int ), void* obj) {
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<GenericFunctionScriptType>(), rand());
t->RegisterOption(opt);