Implemented native C functions called from Toy scripts

There's only example functions for now, but I'll add type-specific
functions later.
This commit is contained in:
2026-04-16 21:14:42 +10:00
parent 3a0f11ebb4
commit 88100b128a
8 changed files with 93 additions and 4 deletions

View File

@@ -319,7 +319,7 @@ bool Toy_checkValuesAreEqual(Toy_Value left, Toy_Value right) {
return left.as.function->bytecode.code == right.as.function->bytecode.code;
}
else {
return left.as.function->native.ptr == right.as.function->native.ptr;
return left.as.function->native.callback == right.as.function->native.callback;
}
}
else {