Make Directory.list() create and return a list from C.

This commit is contained in:
Bob Nystrom
2015-12-29 08:37:47 -08:00
parent e0ac88c22a
commit 2c31985e54
7 changed files with 29 additions and 66 deletions
+9
View File
@@ -73,6 +73,15 @@ void callRunTests(WrenVM* vm)
wrenSetSlotBytes(vm, 2, "b\0y\0t\0e", 7);
wrenCall(vm, two);
// Call ignores with extra temporary slots on stack.
wrenEnsureSlots(vm, 10);
wrenSetSlotValue(vm, 0, callClass);
for (int i = 1; i < 10; i++)
{
wrenSetSlotDouble(vm, i, i * 0.1);
}
wrenCall(vm, one);
wrenReleaseValue(vm, callClass);
wrenReleaseValue(vm, noParams);
wrenReleaseValue(vm, zero);
+1
View File
@@ -33,3 +33,4 @@ class Call {
// expect: two string another
// expect: two null [a, b]
// expect: two str [98, 0, 121, 0, 116, 0, 101]
// expect: one 0.1