refactor envvars, oserrors; register vmops (#20592)

* refactor envvars, oserrors; register vmops

* remove type definitions
This commit is contained in:
ringabout
2022-10-19 01:44:26 +08:00
committed by GitHub
parent b13ef07f58
commit b07526b2c7
5 changed files with 17 additions and 347 deletions

View File

@@ -46,6 +46,7 @@ template main =
doAssert not existsEnv("NIM_TESTS_TOSENV_PUT=DUMMY_VALUE")
doAssert not existsEnv("NIM_TESTS_TOSENV_PUT")
static: main()
main()
when defined(windows):
@@ -69,7 +70,7 @@ when not defined(js) and not defined(nimscript):
doAssertRaises(OSError): delEnv("foo=bar")
when defined(windows):
when defined(windows) and not defined(nimscript):
import std/encodings
proc c_putenv(env: cstring): int32 {.importc: "putenv", header: "<stdlib.h>".}