diff options
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/system.nim b/lib/system.nim index 07fcbd369..919b4694c 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1827,7 +1827,7 @@ const NimMinor*: int = 15 ## is the minor number of Nim's version. - NimPatch*: int = 0 + NimPatch*: int = 2 ## is the patch number of Nim's version. NimVersion*: string = $NimMajor & "." & $NimMinor & "." & $NimPatch @@ -2581,10 +2581,11 @@ else: when not defined(JS): #and not defined(nimscript): {.push stack_trace: off, profiler:off.} - when not defined(nimscript) and not defined(nogc): + when hasAlloc: when not defined(gcStack): proc initGC() - when not defined(boehmgc) and not defined(useMalloc) and not defined(gogc) and not defined(gcStack): + when not defined(boehmgc) and not defined(useMalloc) and + not defined(gogc) and not defined(gcStack): proc initAllocator() {.inline.} proc initStackBottom() {.inline, compilerproc.} = @@ -2602,7 +2603,6 @@ when not defined(JS): #and not defined(nimscript): when declared(setStackBottom): setStackBottom(locals) - when hasAlloc: var strDesc = TNimType(size: sizeof(string), kind: tyString, flags: {ntfAcyclic}) @@ -2731,7 +2731,7 @@ when not defined(JS): #and not defined(nimscript): proc setStdIoUnbuffered*() {.tags: [], benign.} ## Configures `stdin`, `stdout` and `stderr` to be unbuffered. - proc close*(f: File) {.tags: [].} + proc close*(f: File) {.tags: [], gcsafe.} ## Closes the file. proc endOfFile*(f: File): bool {.tags: [], benign.} @@ -3676,7 +3676,7 @@ template closureScope*(body: untyped): untyped = when defined(nimconfig): include "system/nimscript" -when defined(windows) and appType == "console" and not defined(nimconfig): +when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage): proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32", importc: "SetConsoleOutputCP".} discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage |