forked from ground/ground
Merge branch 'master' of https://chookspace.com/ground/ground
This commit is contained in:
@@ -193,6 +193,14 @@ GroundValue groundRunFunction(GroundFunction* function, size_t argc, ...) {
|
|||||||
// Seems to crash some functions
|
// Seems to crash some functions
|
||||||
// GroundScope callScope = copyGroundScope(&function->closure);
|
// GroundScope callScope = copyGroundScope(&function->closure);
|
||||||
|
|
||||||
|
if (function->isNative) {
|
||||||
|
List argsList = createList();
|
||||||
|
for (size_t i = 0; i < argc; i++) {
|
||||||
|
appendToList(&argsList, va_arg(args, GroundValue));
|
||||||
|
}
|
||||||
|
return function->nativeFn(NULL, argsList);
|
||||||
|
}
|
||||||
|
|
||||||
GroundScope callScope = {
|
GroundScope callScope = {
|
||||||
.labels = malloc(sizeof(GroundLabel*)),
|
.labels = malloc(sizeof(GroundLabel*)),
|
||||||
.variables = malloc(sizeof(GroundVariable*)),
|
.variables = malloc(sizeof(GroundVariable*)),
|
||||||
|
|||||||
Reference in New Issue
Block a user