feat: add Process.version static method exposing WREN_VERSION_STRING
Implement a new `Process.version` foreign static method that returns the Wren version string. The C implementation uses `wrenSetSlotString` with the `WREN_VERSION_STRING` macro, and the Wren binding registers it alongside existing `Process` methods. A new test file validates the returned value is a non-empty string composed of dot-separated numeric segments.
This commit is contained in:
@@ -25,6 +25,7 @@ extern void fileWriteBytes(WrenVM* vm);
|
||||
extern void platformIsPosix(WrenVM* vm);
|
||||
extern void platformName(WrenVM* vm);
|
||||
extern void processAllArguments(WrenVM* vm);
|
||||
extern void processVersion(WrenVM* vm);
|
||||
extern void processCwd(WrenVM* vm);
|
||||
extern void statPath(WrenVM* vm);
|
||||
extern void statBlockCount(WrenVM* vm);
|
||||
@@ -166,6 +167,7 @@ static ModuleRegistry modules[] =
|
||||
END_CLASS
|
||||
CLASS(Process)
|
||||
STATIC_METHOD("allArguments", processAllArguments)
|
||||
STATIC_METHOD("version", processVersion)
|
||||
STATIC_METHOD("cwd", processCwd)
|
||||
END_CLASS
|
||||
END_MODULE
|
||||
|
||||
Reference in New Issue
Block a user