Extlibs can call extlib functions i hope

This commit is contained in:
2026-04-13 11:19:34 +10:00
parent 68bd7f065a
commit a38d84ec8c

View File

@@ -193,6 +193,14 @@ GroundValue groundRunFunction(GroundFunction* function, size_t argc, ...) {
// Seems to crash some functions
// 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 = {
.labels = malloc(sizeof(GroundLabel*)),
.variables = malloc(sizeof(GroundVariable*)),