diff options
author | Araq <rumpf_a@web.de> | 2011-11-21 01:33:18 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-11-21 01:33:18 +0100 |
commit | c8dda8cc6f209a1d5e960c6aeadcf9c43906f9f9 (patch) | |
tree | 33f0b709f2f405d24ef99ced6e913c60d5f1614e /lib/system | |
parent | 04e5c6718e69e8f629cb2510d7d9b198e894131a (diff) | |
download | Nim-c8dda8cc6f209a1d5e960c6aeadcf9c43906f9f9.tar.gz |
attempt to fix tunidecode test; GC cares for seq->openArray conversions
Diffstat (limited to 'lib/system')
-rwxr-xr-x | lib/system/gc.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 351f0df9b..f56821180 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -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: |