Extern C support for registering function overloads
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-09-14 10:19:56 +02:00
parent 3a9f1f976a
commit 45d3bc690b
2 changed files with 17 additions and 0 deletions

View File

@@ -13,5 +13,11 @@ namespace Porygon::UserData{
t->RegisterOption(opt);
return t;
}
void RegisterFunctionEvalValueOption(const GenericFunctionEvalValue* val,
const Evaluation::EvalValue* (*func)(void*, const ScriptOptions*, const EvalValue* [], int ), void* obj){
auto opt = new UserDataFunction(func, obj);
val->RegisterOption(opt);
}
}
}