Implement Process.version (#42)
* Implement `Process.version` * Update`os` test suite
This commit is contained in:
@@ -71,6 +71,12 @@ void processAllArguments(WrenVM* vm)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void processVersion(WrenVM* vm) {
|
||||
wrenEnsureSlots(vm, 1);
|
||||
wrenSetSlotString(vm, 0, WREN_VERSION_STRING);
|
||||
}
|
||||
|
||||
void processCwd(WrenVM* vm)
|
||||
{
|
||||
wrenEnsureSlots(vm, 1);
|
||||
|
||||
@@ -10,5 +10,6 @@ class Process {
|
||||
static arguments { allArguments[2..-1] }
|
||||
|
||||
foreign static allArguments
|
||||
foreign static version
|
||||
foreign static cwd
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ static const char* osModuleSource =
|
||||
" static arguments { allArguments[2..-1] }\n"
|
||||
"\n"
|
||||
" foreign static allArguments\n"
|
||||
" foreign static version\n"
|
||||
" foreign static cwd\n"
|
||||
"}\n";
|
||||
|
||||
Reference in New Issue
Block a user