summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-08-07 22:40:58 +0200
committerGitHub <noreply@github.com>2019-08-07 22:40:58 +0200
commitc0d240b8cd3dc08d25c671b0dc7614fbfa980c2e (patch)
tree82ca82c0cd8d8dc7bd164d352d9b5a1910cd7164 /lib/pure
parentf34ae81971ada93fd4fda871c3da6cba9aab8bff (diff)
downloadNim-c0d240b8cd3dc08d25c671b0dc7614fbfa980c2e.tar.gz
fixes #11807 (#11900)
* fixes #11807
* make tests green again
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/includes/osenv.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pure/includes/osenv.nim b/lib/pure/includes/osenv.nim
index 193efd4d4..1ddc51f8f 100644
--- a/lib/pure/includes/osenv.nim
+++ b/lib/pure/includes/osenv.nim
@@ -19,6 +19,11 @@ var
   envComputed {.threadvar.}: bool
   environment {.threadvar.}: seq[string]
 
+when defined(nimV2):
+  proc unpairedEnvAllocs*(): int =
+    result = environment.len
+    if result > 0: inc result
+
 when defined(windows) and not defined(nimscript):
   # because we support Windows GUI applications, things get really
   # messy here...