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
commit b07526b2c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>".}