Implements extern C function to set print func
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-07-25 13:30:40 +02:00
parent 40e45b0112
commit e639a2c170
3 changed files with 12 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ namespace Porygon::StandardLibraries{
static Evaluation::EvalValue* _print(void*, Evaluation::EvalValue* parameters[], int parameterCount){
auto message = parameters[0]->EvaluateString();
GlobalScriptOptions::Print(message);
GlobalScriptOptions::Print(message.c_str());
return new Evaluation::NilEvalValue();
}