lexer, parser cleanup; boehm gc for mac os x
This commit is contained in:
parent
aeb0506132
commit
9207492bb9
6 changed files with 104 additions and 100 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue