attempt to fix tunidecode test; GC cares for seq->openArray conversions

This commit is contained in:
Araq 2011-11-21 01:33:18 +01:00
commit c8dda8cc6f
5 changed files with 982 additions and 947 deletions

View file

@ -517,6 +517,12 @@ proc gcMark(gch: var TGcHeap, p: pointer) {.inline.} =
# mark the cell:
cell.refcount = cell.refcount +% rcIncrement
add(gch.decStack, cell)
# care for string->cstring and seq->openArray conversions:
var b = cast[PCell](c -% sizeof(TGenericSeq))
if isAllocatedPtr(gch.region, b):
# mark the cell:
b.refcount = b.refcount +% rcIncrement
add(gch.decStack, b)
proc markThreadStacks(gch: var TGcHeap) =
when hasThreadSupport and hasSharedHeap: