fixes #19713; Revert "Remove tlsEmulation enabled from Windows + GCC config" (#19119) (#20327)

* Revert "Remove tlsEmulation enabled from Windows + GCC config (#19119) [backport:1.6]"

This reverts commit 77b696c2c9.

* increase nimTlsSize to 48000

* enable for windows

* fixes tests

* fixes tlsEmulation:on
This commit is contained in:
ringabout 2022-09-19 15:16:54 +08:00 • committed by GitHub
commit 97259a5ab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View file

@ -86,8 +86,12 @@ proc newRope(data: string = ""): Rope =
result.L = -data.len
result.data = data
var
cache {.threadvar.} : array[0..2048*2 - 1, Rope]
when compileOption("tlsEmulation"): # fixme: be careful if you want to make ropes support multiple threads
var
cache: array[0..2048*2 - 1, Rope]
else:
var
cache {.threadvar.} : array[0..2048*2 - 1, Rope]
proc resetRopeCache* =
for i in low(cache)..high(cache):