Merge branch 'gc-fixes' of https://github.com/rbehrends/Nim into rbehrends-gc-fixes

This commit is contained in:
Araq 2015-10-12 17:34:44 +02:00
commit 967c20743a
4 changed files with 83 additions and 45 deletions

View file

@ -1260,6 +1260,15 @@ const
hasSharedHeap = defined(boehmgc) or defined(gogc) # don't share heaps; every thread has its own
taintMode = compileOption("taintmode")
when defined(boehmgc):
when defined(windows):
const boehmLib = "boehmgc.dll"
elif defined(macosx):
const boehmLib = "libgc.dylib"
else:
const boehmLib = "libgc.so.1"
{.pragma: boehmGC, noconv, dynlib: boehmLib.}
when taintMode:
type TaintedString* = distinct string ## a distinct string type that
## is `tainted`:idx:. It is an alias for