Updated Toy, tweaked code to match new API
This commit is contained in:
@@ -106,15 +106,15 @@ Toy_Literal Box_callEngineNodeLiteral(Box_EngineNode* node, Toy_Interpreter* int
|
||||
Toy_initLiteralArray(&arguments);
|
||||
Toy_initLiteralArray(&returns);
|
||||
|
||||
//feed the arguments in backwards!
|
||||
//feed the arguments in
|
||||
Toy_pushLiteralArray(&arguments, n);
|
||||
|
||||
if (args) {
|
||||
for (int i = args->count -1; i >= 0; i--) {
|
||||
for (int i = 0; i < args->count; i++) {
|
||||
Toy_pushLiteralArray(&arguments, args->literals[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Toy_pushLiteralArray(&arguments, n);
|
||||
|
||||
Toy_callLiteralFn(interpreter, fn, &arguments, &returns);
|
||||
|
||||
ret = Toy_popLiteralArray(&returns);
|
||||
@@ -151,15 +151,15 @@ void Box_callRecursiveEngineNodeLiteral(Box_EngineNode* node, Toy_Interpreter* i
|
||||
Toy_initLiteralArray(&arguments);
|
||||
Toy_initLiteralArray(&returns);
|
||||
|
||||
//feed the arguments in backwards!
|
||||
//feed the arguments in
|
||||
Toy_pushLiteralArray(&arguments, n);
|
||||
|
||||
if (args) {
|
||||
for (int i = args->count -1; i >= 0; i--) {
|
||||
for (int i = 0; i < args->count; i++) {
|
||||
Toy_pushLiteralArray(&arguments, args->literals[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Toy_pushLiteralArray(&arguments, n);
|
||||
|
||||
Toy_callLiteralFn(interpreter, fn, &arguments, &returns);
|
||||
|
||||
Toy_freeLiteralArray(&arguments);
|
||||
|
||||
Reference in New Issue
Block a user