lexer, parser cleanup; boehm gc for mac os x

This commit is contained in:
Araq
2011-05-17 21:14:30 +02:00
parent aeb0506132
commit 9207492bb9
6 changed files with 104 additions and 100 deletions

View File

@@ -65,6 +65,10 @@ proc raiseOutOfMem() {.noreturn.} =
when defined(boehmgc):
when defined(windows):
const boehmLib = "boehmgc.dll"
elif defined(macosx):
const boehmLib = "libgc.dylib"
proc boehmGCinit {.importc: "GC_init", dynlib: boehmLib.}
else:
const boehmLib = "/usr/lib/libgc.so.1"
@@ -93,7 +97,8 @@ when defined(boehmgc):
proc dealloc(p: Pointer) =
boehmDealloc(p)
proc initGC() = nil
proc initGC() =
when defined(macosx): boehmGCinit()
#boehmGCincremental()