diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-20 13:58:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 07:58:29 +0200 |
commit | f6a002c8a582d83e9d7b51b945d26cf428699ad9 (patch) | |
tree | b89bfe169e1707a6c66fa24c8e880bb8a2f3fc81 /compiler/vmops.nim | |
parent | ea5dcdbe8f9cd62e06f300c660cb31667b95b26c (diff) | |
download | Nim-f6a002c8a582d83e9d7b51b945d26cf428699ad9.tar.gz |
[std/os] split and re-export (#20593)
* [std/os] split and export * move to private modules * fixes docs and tests Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Diffstat (limited to 'compiler/vmops.nim')
-rw-r--r-- | compiler/vmops.nim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim index 932783097..49b853790 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -22,8 +22,9 @@ when declared(math.signbit): # ditto from std/math as math3 import signbit + from std/envvars import getEnv, existsEnv, delEnv, putEnv, envPairs -from std/os import dirExists, fileExists, walkDir, getAppFilename +from std/os import walkDir, getAppFilename, dirExists, fileExists from std/times import cpuTime from std/hashes import hash @@ -44,6 +45,8 @@ template mathop(op) {.dirty.} = template osop(op) {.dirty.} = registerCallback(c, "stdlib.os." & astToStr(op), `op Wrapper`) +template oscommonop(op) {.dirty.} = + registerCallback(c, "stdlib.oscommon." & astToStr(op), `op Wrapper`) template envvarsop(op) {.dirty.} = registerCallback(c, "stdlib.envvars." & astToStr(op), `op Wrapper`) @@ -226,8 +229,8 @@ proc registerAdditionalOps*(c: PCtx) = wrap1s(existsEnv, envvarsop) wrap2svoid(putEnv, envvarsop) wrap1svoid(delEnv, envvarsop) - wrap1s(dirExists, osop) - wrap1s(fileExists, osop) + wrap1s(dirExists, oscommonop) + wrap1s(fileExists, oscommonop) wrapDangerous(writeFile, ioop) wrap1s(readFile, ioop) wrap2si(readLines, ioop) |