Implement Platform.homePath (#48)

* fix naming and path max

Co-authored-by: ruby0x1 <ruby0x1@pm.me>
This commit is contained in:
Dario Vladović
2021-05-02 13:00:19 -07:00
committed by GitHub
co-authored by ruby0x1
parent 8227330eb6
commit 8190115b97
5 changed files with 38 additions and 0 deletions
+2
View File
@@ -24,6 +24,7 @@ extern void fileRealPath(WrenVM* vm);
extern void fileSize(WrenVM* vm);
extern void fileStat(WrenVM* vm);
extern void fileWriteBytes(WrenVM* vm);
extern void platformHomePath(WrenVM* vm);
extern void platformIsPosix(WrenVM* vm);
extern void platformName(WrenVM* vm);
extern void processAllArguments(WrenVM* vm);
@@ -169,6 +170,7 @@ static ModuleRegistry modules[] =
END_MODULE
MODULE(os)
CLASS(Platform)
STATIC_METHOD("homePath", platformHomePath)
STATIC_METHOD("isPosix", platformIsPosix)
STATIC_METHOD("name", platformName)
END_CLASS